Class: Google::Cloud::Video::LiveStream::V1::LivestreamService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/video/live_stream/v1/livestream_service/client.rb

Overview

Client for the LivestreamService service.

Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT).

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#asset_path, #channel_path, #clip_path, #event_path, #input_path, #location_path, #network_path, #pool_path, #secret_version_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new LivestreamService client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the LivestreamService client.

Yield Parameters:



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 180

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/video/livestream/v1/service_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @livestream_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Video::LiveStream::V1::LivestreamService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool
  )

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @livestream_service_stub.endpoint
    config.universe_domain = @livestream_service_stub.universe_domain
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


246
247
248
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 246

def location_client
  @location_client
end

#operations_client::Google::Cloud::Video::LiveStream::V1::LivestreamService::Operations (readonly)

Get the associated client for long-running operations.



239
240
241
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 239

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the LivestreamService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all LivestreamService clients
::Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 68

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Video", "LiveStream", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.create_channel.timeout = 60.0

    default_config.rpcs.list_channels.timeout = 60.0
    default_config.rpcs.list_channels.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_channel.timeout = 60.0
    default_config.rpcs.get_channel.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_channel.timeout = 60.0

    default_config.rpcs.update_channel.timeout = 60.0

    default_config.rpcs.start_channel.timeout = 60.0

    default_config.rpcs.stop_channel.timeout = 60.0

    default_config.rpcs.create_input.timeout = 60.0

    default_config.rpcs.list_inputs.timeout = 60.0
    default_config.rpcs.list_inputs.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_input.timeout = 60.0
    default_config.rpcs.get_input.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_input.timeout = 60.0

    default_config.rpcs.update_input.timeout = 60.0

    default_config.rpcs.create_event.timeout = 60.0

    default_config.rpcs.list_events.timeout = 60.0
    default_config.rpcs.list_events.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.get_event.timeout = 60.0
    default_config.rpcs.get_event.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.delete_event.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the LivestreamService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



150
151
152
153
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 150

def configure
  yield @config if block_given?
  @config
end

#create_asset(request, options = nil) ⇒ ::Gapic::Operation #create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a Asset with the provided unique ID in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::CreateAssetRequest.new

# Call the create_asset method.
result = client.create_asset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_asset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_asset via a request object, either of type CreateAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_asset(parent: nil, asset: nil, asset_id: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • asset (::Google::Cloud::Video::LiveStream::V1::Asset, ::Hash) (defaults to: nil)

      Required. The asset resource to be created.

    • asset_id (::String) (defaults to: nil)

      Required. The ID of the asset resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2444

def create_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_asset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :create_asset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_channel(request, options = nil) ⇒ ::Gapic::Operation #create_channel(parent: nil, channel: nil, channel_id: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a channel with the provided unique ID in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::CreateChannelRequest.new

# Call the create_channel method.
result = client.create_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel via a request object, either of type CreateChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_channel(parent: nil, channel: nil, channel_id: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • channel (::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash) (defaults to: nil)

      Required. The channel resource to be created.

    • channel_id (::String) (defaults to: nil)

      Required. The ID of the channel resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 323

def create_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :create_channel, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_clip(request, options = nil) ⇒ ::Gapic::Operation #create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a clip with the provided clip ID in the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::CreateClipRequest.new

# Call the create_clip method.
result = client.create_clip request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_clip(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_clip via a request object, either of type CreateClipRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::CreateClipRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_clip(parent: nil, clip_id: nil, clip: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_clip via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource name, in the following form: projects/{project}/locations/{location}/channels/{channel}.

    • clip_id (::String) (defaults to: nil)

      Required. Id of the requesting object in the following form:

      1. 1 character minimum, 63 characters maximum
      2. Only contains letters, digits, underscores, and hyphens
    • clip (::Google::Cloud::Video::LiveStream::V1::Clip, ::Hash) (defaults to: nil)

      Required. The resource being created

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2218

def create_clip request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateClipRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_clip..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_clip.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_clip.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :create_clip, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_event(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event #create_event(parent: nil, event: nil, event_id: nil, request_id: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

Creates an event with the provided unique ID in the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::CreateEventRequest.new

# Call the create_event method.
result = client.create_event request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
p result

Overloads:

  • #create_event(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

    Pass arguments to create_event via a request object, either of type CreateEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::CreateEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_event(parent: nil, event: nil, event_id: nil, request_id: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

    Pass arguments to create_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

    • event (::Google::Cloud::Video::LiveStream::V1::Event, ::Hash) (defaults to: nil)

      Required. The event resource to be created.

    • event_id (::String) (defaults to: nil)

      Required. The ID of the event resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1623

def create_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_event..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :create_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_input(request, options = nil) ⇒ ::Gapic::Operation #create_input(parent: nil, input: nil, input_id: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates an input with the provided unique ID in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::CreateInputRequest.new

# Call the create_input method.
result = client.create_input request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_input(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_input via a request object, either of type CreateInputRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::CreateInputRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_input(parent: nil, input: nil, input_id: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_input via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • input (::Google::Cloud::Video::LiveStream::V1::Input, ::Hash) (defaults to: nil)

      Required. The input resource to be created.

    • input_id (::String) (defaults to: nil)

      Required. The ID of the input resource to be created. This value must be 1-63 characters, begin and end with [a-z0-9], could contain dashes (-) in between.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1093

def create_input request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::CreateInputRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_input..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_input.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_input.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :create_input, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_asset(request, options = nil) ⇒ ::Gapic::Operation #delete_asset(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes the specified asset if it is not used.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest.new

# Call the delete_asset method.
result = client.delete_asset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_asset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_asset via a request object, either of type DeleteAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_asset(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the asset resource, in the form of: projects/{project}/locations/{location}/assets/{assetId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2553

def delete_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_asset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :delete_asset, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_channel(request, options = nil) ⇒ ::Gapic::Operation #delete_channel(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest.new

# Call the delete_channel method.
result = client.delete_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel via a request object, either of type DeleteChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_channel(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • force (::Boolean) (defaults to: nil)

      If the force field is set to the default value of false, you must delete all of a channel's events before you can delete the channel itself. If the field is set to true, requests to delete a channel also delete associated channel events.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 629

def delete_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :delete_channel, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_clip(request, options = nil) ⇒ ::Gapic::Operation #delete_clip(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in the GCS.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::DeleteClipRequest.new

# Call the delete_clip method.
result = client.delete_clip request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_clip(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_clip via a request object, either of type DeleteClipRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_clip(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_clip via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the clip resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}.

    • request_id (::String) (defaults to: nil)

      Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2328

def delete_clip request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteClipRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_clip..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_clip.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_clip.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :delete_clip, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_event(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_event(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified event.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::DeleteEventRequest.new

# Call the delete_event method.
result = client.delete_event request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_event(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_event via a request object, either of type DeleteEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_event(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1916

def delete_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_event..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :delete_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_input(request, options = nil) ⇒ ::Gapic::Operation #delete_input(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes the specified input.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::DeleteInputRequest.new

# Call the delete_input method.
result = client.delete_input request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_input(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_input via a request object, either of type DeleteInputRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_input(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_input via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1394

def delete_input request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::DeleteInputRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_input..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_input.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_input.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :delete_input, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_asset(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Asset #get_asset(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Asset

Returns the specified asset.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetAssetRequest.new

# Call the get_asset method.
result = client.get_asset request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Asset.
p result

Overloads:

  • #get_asset(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Asset

    Pass arguments to get_asset via a request object, either of type GetAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_asset(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Asset

    Pass arguments to get_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource, in the following form: projects/{project}/locations/{location}/assets/{asset}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2641

def get_asset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetAssetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_asset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_asset, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_channel(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Channel #get_channel(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Channel

Returns the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetChannelRequest.new

# Call the get_channel method.
result = client.get_channel request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Channel.
p result

Overloads:

  • #get_channel(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Channel

    Pass arguments to get_channel via a request object, either of type GetChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_channel(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Channel

    Pass arguments to get_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 516

def get_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_channel, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_clip(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Clip #get_clip(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Clip

Returns the specified clip.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetClipRequest.new

# Call the get_clip method.
result = client.get_clip request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Clip.
p result

Overloads:

  • #get_clip(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Clip

    Pass arguments to get_clip via a request object, either of type GetClipRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetClipRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_clip(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Clip

    Pass arguments to get_clip via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource, in the following form: projects/{project}/locations/{location}/channels/{channel}/clips/{clip}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2103

def get_clip request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetClipRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_clip..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_clip.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_clip.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_clip, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_event(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event #get_event(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

Returns the specified event.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetEventRequest.new

# Call the get_event method.
result = client.get_event request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Event.
p result

Overloads:

  • #get_event(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

    Pass arguments to get_event via a request object, either of type GetEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_event(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Event

    Pass arguments to get_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the event resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1815

def get_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_event..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_input(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Input #get_input(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Input

Returns the specified input.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetInputRequest.new

# Call the get_input method.
result = client.get_input request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Input.
p result

Overloads:

  • #get_input(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Input

    Pass arguments to get_input via a request object, either of type GetInputRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetInputRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_input(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Input

    Pass arguments to get_input via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the input resource, in the form of: projects/{project}/locations/{location}/inputs/{inputId}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1286

def get_input request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetInputRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_input..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_input.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_input.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_input, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_pool(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Pool #get_pool(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Pool

Returns the specified pool.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::GetPoolRequest.new

# Call the get_pool method.
result = client.get_pool request

# The returned object is of type Google::Cloud::Video::LiveStream::V1::Pool.
p result

Overloads:

  • #get_pool(request, options = nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Pool

    Pass arguments to get_pool via a request object, either of type GetPoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::GetPoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_pool(name: nil) ⇒ ::Google::Cloud::Video::LiveStream::V1::Pool

    Pass arguments to get_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the pool resource, in the form of: projects/{project}/locations/{location}/pools/{poolId}.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2829

def get_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::GetPoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :get_pool, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_assets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset> #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>

Returns a list of all assets in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::ListAssetsRequest.new

# Call the list_assets method.
result = client.list_assets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Asset.
  p item
end

Overloads:

  • #list_assets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>

    Pass arguments to list_assets via a request object, either of type Google::Cloud::Video::LiveStream::V1::ListAssetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Asset>

    Pass arguments to list_assets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2741

def list_assets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListAssetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_assets..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_assets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_assets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :list_assets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_assets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel> #list_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>

Returns a list of all channels in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::ListChannelsRequest.new

# Call the list_channels method.
result = client.list_channels request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Channel.
  p item
end

Overloads:

  • #list_channels(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>

    Pass arguments to list_channels via a request object, either of type Google::Cloud::Video::LiveStream::V1::ListChannelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Channel>

    Pass arguments to list_channels via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more items left to be queried.

    • page_token (::String) (defaults to: nil)

      The next_page_token value returned from a previous List request, if any.

    • filter (::String) (defaults to: nil)

      The filter to apply to list results.

    • order_by (::String) (defaults to: nil)

      Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 428

def list_channels request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListChannelsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_channels..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_channels.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_channels.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :list_channels, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_channels, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_clips(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip> #list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>

Returns a list of all clips in the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::ListClipsRequest.new

# Call the list_clips method.
result = client.list_clips request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Clip.
  p item
end

Overloads:

  • #list_clips(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>

    Pass arguments to list_clips via a request object, either of type Google::Cloud::Video::LiveStream::V1::ListClipsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::ListClipsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_clips(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Clip>

    Pass arguments to list_clips via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListClipsRequest

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results

    • order_by (::String) (defaults to: nil)

      Hint for how to order the results

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2015

def list_clips request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListClipsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_clips..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_clips.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_clips.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :list_clips, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_clips, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event> #list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>

Returns a list of all events in the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::ListEventsRequest.new

# Call the list_events method.
result = client.list_events request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Event.
  p item
end

Overloads:

  • #list_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>

    Pass arguments to list_events via a request object, either of type Google::Cloud::Video::LiveStream::V1::ListEventsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::ListEventsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Event>

    Pass arguments to list_events via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent channel for the resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more items left to be queried.

    • page_token (::String) (defaults to: nil)

      The next_page_token value returned from a previous List request, if any.

    • filter (::String) (defaults to: nil)

      The filter to apply to list results.

    • order_by (::String) (defaults to: nil)

      Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1727

def list_events request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListEventsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_events..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_events.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_events.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :list_events, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_events, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_inputs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input> #list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>

Returns a list of all inputs in the specified region.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::ListInputsRequest.new

# Call the list_inputs method.
result = client.list_inputs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Video::LiveStream::V1::Input.
  p item
end

Overloads:

  • #list_inputs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>

    Pass arguments to list_inputs via a request object, either of type Google::Cloud::Video::LiveStream::V1::ListInputsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::ListInputsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_inputs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Video::LiveStream::V1::Input>

    Pass arguments to list_inputs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent location for the resource, in the form of: projects/{project}/locations/{location}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more items left to be queried.

    • page_token (::String) (defaults to: nil)

      The next_page_token value returned from a previous List request, if any.

    • filter (::String) (defaults to: nil)

      The filter to apply to list results.

    • order_by (::String) (defaults to: nil)

      Specifies the ordering of results following syntax at Sorting Order.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1198

def list_inputs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::ListInputsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_inputs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_inputs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_inputs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :list_inputs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @livestream_service_stub, :list_inputs, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#start_channel(request, options = nil) ⇒ ::Gapic::Operation #start_channel(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::StartChannelRequest.new

# Call the start_channel method.
result = client.start_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #start_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to start_channel via a request object, either of type StartChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::StartChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #start_channel(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to start_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 868

def start_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StartChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.start_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.start_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.start_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :start_channel, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#stop_channel(request, options = nil) ⇒ ::Gapic::Operation #stop_channel(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::StopChannelRequest.new

# Call the stop_channel method.
result = client.stop_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #stop_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_channel via a request object, either of type StopChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::StopChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #stop_channel(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the channel resource, in the form of: projects/{project}/locations/{location}/channels/{channelId}.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 978

def stop_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::StopChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.stop_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.stop_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.stop_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :stop_channel, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


160
161
162
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 160

def universe_domain
  @livestream_service_stub.universe_domain
end

#update_channel(request, options = nil) ⇒ ::Gapic::Operation #update_channel(update_mask: nil, channel: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the specified channel.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest.new

# Call the update_channel method.
result = client.update_channel request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_channel(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_channel via a request object, either of type UpdateChannelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_channel(update_mask: nil, channel: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_channel via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Field mask is used to specify the fields to be overwritten in the Channel resource by the update. You can only update the following fields:

      The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

      If the mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.

    • channel (::Google::Cloud::Video::LiveStream::V1::Channel, ::Hash) (defaults to: nil)

      Required. The channel resource to be updated.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 758

def update_channel request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateChannelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_channel..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.channel&.name
    header_params["channel.name"] = request.channel.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_channel.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_channel.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :update_channel, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_input(request, options = nil) ⇒ ::Gapic::Operation #update_input(update_mask: nil, input: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the specified input.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::UpdateInputRequest.new

# Call the update_input method.
result = client.update_input request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_input(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_input via a request object, either of type UpdateInputRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_input(update_mask: nil, input: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_input via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Field mask is used to specify the fields to be overwritten in the Input resource by the update. You can only update the following fields:

      The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

      If the mask is not present, then each field from the list above is updated if the field appears in the request payload. To unset a field, add the field to the update mask and remove it from the request payload.

    • input (::Google::Cloud::Video::LiveStream::V1::Input, ::Hash) (defaults to: nil)

      Required. The input resource to be updated.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 1515

def update_input request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdateInputRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_input..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.input&.name
    header_params["input.name"] = request.input.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_input.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_input.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :update_input, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_pool(request, options = nil) ⇒ ::Gapic::Operation #update_pool(update_mask: nil, pool: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the specified pool.

Examples:

Basic example

require "google/cloud/video/live_stream/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Video::LiveStream::V1::LivestreamService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest.new

# Call the update_pool method.
result = client.update_pool request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_pool(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pool via a request object, either of type UpdatePoolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_pool(update_mask: nil, pool: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_pool via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Field mask is used to specify the fields to be overwritten in the Pool resource by the update. You can only update the following fields:

      • networkConfig

      The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.

    • pool (::Google::Cloud::Video::LiveStream::V1::Pool, ::Hash) (defaults to: nil)

      Required. The pool resource to be updated.

    • request_id (::String) (defaults to: nil)

      A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
# File 'lib/google/cloud/video/live_stream/v1/livestream_service/client.rb', line 2944

def update_pool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Video::LiveStream::V1::UpdatePoolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_pool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Video::LiveStream::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.pool&.name
    header_params["pool.name"] = request.pool.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_pool.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_pool.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @livestream_service_stub.call_rpc :update_pool, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end