Vision AI V1 API - Class Google::Cloud::VisionAI::V1::StreamsService::Rest::Client (v0.1.0)

Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.

REST client for the StreamsService service.

Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the StreamsService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all StreamsService clients
::Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the StreamsService 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 Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_cluster

def create_cluster(request, options = nil) -> ::Gapic::Operation
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Cluster in a given project and location.

Overloads
def create_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_cluster via a request object, either of type CreateClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::CreateClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_cluster 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) — Required. Value for parent.
  • cluster_id (::String) — Required. Id of the requesting object.
  • cluster (::Google::Cloud::VisionAI::V1::Cluster, ::Hash) — Required. The resource being created.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::CreateClusterRequest.new

# Call the create_cluster method.
result = client.create_cluster 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

#create_event

def create_event(request, options = nil) -> ::Gapic::Operation
def create_event(parent: nil, event_id: nil, event: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Event in a given project and location.

Overloads
def create_event(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_event via a request object, either of type CreateEventRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_event(parent: nil, event_id: nil, event: nil, request_id: nil) -> ::Gapic::Operation
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) — Required. Value for parent.
  • event_id (::String) — Required. Id of the requesting object.
  • event (::Google::Cloud::VisionAI::V1::Event, ::Hash) — Required. The resource being created.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

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

# Call the create_event method.
result = client.create_event 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

#create_series

def create_series(request, options = nil) -> ::Gapic::Operation
def create_series(parent: nil, series_id: nil, series: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Series in a given project and location.

Overloads
def create_series(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_series via a request object, either of type CreateSeriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::CreateSeriesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_series(parent: nil, series_id: nil, series: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_series 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) — Required. Value for parent.
  • series_id (::String) — Required. Id of the requesting object.
  • series (::Google::Cloud::VisionAI::V1::Series, ::Hash) — Required. The resource being created.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::CreateSeriesRequest.new

# Call the create_series method.
result = client.create_series 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

#create_stream

def create_stream(request, options = nil) -> ::Gapic::Operation
def create_stream(parent: nil, stream_id: nil, stream: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Stream in a given project and location.

Overloads
def create_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_stream via a request object, either of type CreateStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::CreateStreamRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_stream(parent: nil, stream_id: nil, stream: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_stream 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) — Required. Value for parent.
  • stream_id (::String) — Required. Id of the requesting object.
  • stream (::Google::Cloud::VisionAI::V1::Stream, ::Hash) — Required. The resource being created.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::CreateStreamRequest.new

# Call the create_stream method.
result = client.create_stream 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

#delete_cluster

def delete_cluster(request, options = nil) -> ::Gapic::Operation
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Cluster.

Overloads
def delete_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_cluster via a request object, either of type DeleteClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::DeleteClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_cluster 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) — Required. Name of the resource
  • request_id (::String) — 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 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::DeleteClusterRequest.new

# Call the delete_cluster method.
result = client.delete_cluster 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

#delete_event

def delete_event(request, options = nil) -> ::Gapic::Operation
def delete_event(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Event.

Overloads
def delete_event(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_event via a request object, either of type DeleteEventRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_event(name: nil, request_id: nil) -> ::Gapic::Operation
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) — Required. Name of the resource.
  • request_id (::String) — 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 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

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

# Call the delete_event method.
result = client.delete_event 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

#delete_series

def delete_series(request, options = nil) -> ::Gapic::Operation
def delete_series(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Series.

Overloads
def delete_series(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_series via a request object, either of type DeleteSeriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::DeleteSeriesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_series(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_series 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) — Required. Name of the resource.
  • request_id (::String) — 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 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::DeleteSeriesRequest.new

# Call the delete_series method.
result = client.delete_series 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

#delete_stream

def delete_stream(request, options = nil) -> ::Gapic::Operation
def delete_stream(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single Stream.

Overloads
def delete_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_stream via a request object, either of type DeleteStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::DeleteStreamRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_stream(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_stream 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) — Required. Name of the resource.
  • request_id (::String) — 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 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::DeleteStreamRequest.new

# Call the delete_stream method.
result = client.delete_stream 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

#generate_stream_hls_token

def generate_stream_hls_token(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenResponse
def generate_stream_hls_token(stream: nil) -> ::Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenResponse

Generate the JWT auth token required to get the stream HLS contents.

Overloads
def generate_stream_hls_token(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenResponse
Pass arguments to generate_stream_hls_token via a request object, either of type GenerateStreamHlsTokenRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def generate_stream_hls_token(stream: nil) -> ::Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenResponse
Pass arguments to generate_stream_hls_token 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).
Parameter
  • stream (::String) — Required. The name of the stream.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenRequest.new

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

# The returned object is of type Google::Cloud::VisionAI::V1::GenerateStreamHlsTokenResponse.
p result

#get_cluster

def get_cluster(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Cluster
def get_cluster(name: nil) -> ::Google::Cloud::VisionAI::V1::Cluster

Gets details of a single Cluster.

Overloads
def get_cluster(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Cluster
Pass arguments to get_cluster via a request object, either of type GetClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::GetClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_cluster(name: nil) -> ::Google::Cloud::VisionAI::V1::Cluster
Pass arguments to get_cluster 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).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::GetClusterRequest.new

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

# The returned object is of type Google::Cloud::VisionAI::V1::Cluster.
p result

#get_event

def get_event(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Event
def get_event(name: nil) -> ::Google::Cloud::VisionAI::V1::Event

Gets details of a single Event.

Overloads
def get_event(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Event
Pass arguments to get_event via a request object, either of type GetEventRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_event(name: nil) -> ::Google::Cloud::VisionAI::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).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

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

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

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

#get_series

def get_series(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Series
def get_series(name: nil) -> ::Google::Cloud::VisionAI::V1::Series

Gets details of a single Series.

Overloads
def get_series(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Series
Pass arguments to get_series via a request object, either of type GetSeriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::GetSeriesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_series(name: nil) -> ::Google::Cloud::VisionAI::V1::Series
Pass arguments to get_series 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).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::GetSeriesRequest.new

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

# The returned object is of type Google::Cloud::VisionAI::V1::Series.
p result

#get_stream

def get_stream(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Stream
def get_stream(name: nil) -> ::Google::Cloud::VisionAI::V1::Stream

Gets details of a single Stream.

Overloads
def get_stream(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Stream
Pass arguments to get_stream via a request object, either of type GetStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::GetStreamRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_stream(name: nil) -> ::Google::Cloud::VisionAI::V1::Stream
Pass arguments to get_stream 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).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::GetStreamRequest.new

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

# The returned object is of type Google::Cloud::VisionAI::V1::Stream.
p result

#get_stream_thumbnail

def get_stream_thumbnail(request, options = nil) -> ::Gapic::Operation
def get_stream_thumbnail(stream: nil, gcs_object_name: nil, event: nil, request_id: nil) -> ::Gapic::Operation

Gets the thumbnail (image snapshot) of a single Stream.

Overloads
def get_stream_thumbnail(request, options = nil) -> ::Gapic::Operation
Pass arguments to get_stream_thumbnail via a request object, either of type GetStreamThumbnailRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::GetStreamThumbnailRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_stream_thumbnail(stream: nil, gcs_object_name: nil, event: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to get_stream_thumbnail 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
  • stream (::String) — Required. The name of the stream for to get the thumbnail from.
  • gcs_object_name (::String) — Required. The name of the GCS object to store the thumbnail image.
  • event (::String) — Optional. The name of the event. If unspecified, the thumbnail will be retrieved from the latest event.
  • request_id (::String) — Optional. An optional request ID to identify the 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::GetStreamThumbnailRequest.new

# Call the get_stream_thumbnail method.
result = client.get_stream_thumbnail 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

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

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

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new StreamsService REST client object.

Yields
  • (config) — Configure the StreamsService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_clusters

def list_clusters(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListClustersResponse
def list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListClustersResponse

Lists Clusters in a given project and location.

Overloads
def list_clusters(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListClustersResponse
Pass arguments to list_clusters via a request object, either of type ListClustersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::ListClustersRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListClustersResponse
Pass arguments to list_clusters 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) — Required. Parent value for ListClustersRequest.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results the server should return.
  • filter (::String) — Filtering results.
  • order_by (::String) — Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::ListClustersRequest.new

# Call the list_clusters method.
result = client.list_clusters 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::VisionAI::V1::Cluster.
  p item
end

#list_events

def list_events(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListEventsResponse
def list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListEventsResponse

Lists Events in a given project and location.

Overloads
def list_events(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListEventsResponse
Pass arguments to list_events via a request object, either of type ListEventsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_events(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListEventsResponse
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) — Required. Parent value for ListEventsRequest.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results the server should return.
  • filter (::String) — Filtering results.
  • order_by (::String) — Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::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::VisionAI::V1::Event.
  p item
end

#list_series

def list_series(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListSeriesResponse
def list_series(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListSeriesResponse

Lists Series in a given project and location.

Overloads
def list_series(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListSeriesResponse
Pass arguments to list_series via a request object, either of type ListSeriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::ListSeriesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_series(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListSeriesResponse
Pass arguments to list_series 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) — Required. Parent value for ListSeriesRequest.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results the server should return.
  • filter (::String) — Filtering results.
  • order_by (::String) — Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::ListSeriesRequest.new

# Call the list_series method.
result = client.list_series 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::VisionAI::V1::Series.
  p item
end

#list_streams

def list_streams(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListStreamsResponse
def list_streams(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListStreamsResponse

Lists Streams in a given project and location.

Overloads
def list_streams(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ListStreamsResponse
Pass arguments to list_streams via a request object, either of type ListStreamsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::ListStreamsRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_streams(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::VisionAI::V1::ListStreamsResponse
Pass arguments to list_streams 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) — Required. Parent value for ListStreamsRequest.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results the server should return.
  • filter (::String) — Filtering results.
  • order_by (::String) — Hint for how to order the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::ListStreamsRequest.new

# Call the list_streams method.
result = client.list_streams 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::VisionAI::V1::Stream.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

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

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

#materialize_channel

def materialize_channel(request, options = nil) -> ::Gapic::Operation
def materialize_channel(parent: nil, channel_id: nil, channel: nil, request_id: nil) -> ::Gapic::Operation

Materialize a channel.

Overloads
def materialize_channel(request, options = nil) -> ::Gapic::Operation
Pass arguments to materialize_channel via a request object, either of type MaterializeChannelRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::MaterializeChannelRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def materialize_channel(parent: nil, channel_id: nil, channel: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to materialize_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) — Required. Value for parent.
  • channel_id (::String) — Required. Id of the channel.
  • channel (::Google::Cloud::VisionAI::V1::Channel, ::Hash) — Required. The resource being created.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::MaterializeChannelRequest.new

# Call the materialize_channel method.
result = client.materialize_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

#operations_client

def operations_client() -> ::Google::Cloud::VisionAI::V1::StreamsService::Rest::Operations

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_cluster

def update_cluster(request, options = nil) -> ::Gapic::Operation
def update_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Cluster.

Overloads
def update_cluster(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_cluster via a request object, either of type UpdateClusterRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::UpdateClusterRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_cluster(update_mask: nil, cluster: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_cluster 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) — Required. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update. 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 user does not provide a mask then all fields will be overwritten.
  • cluster (::Google::Cloud::VisionAI::V1::Cluster, ::Hash) — Required. The resource being updated
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::UpdateClusterRequest.new

# Call the update_cluster method.
result = client.update_cluster 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

#update_event

def update_event(request, options = nil) -> ::Gapic::Operation
def update_event(update_mask: nil, event: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Event.

Overloads
def update_event(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_event via a request object, either of type UpdateEventRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::UpdateEventRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_event(update_mask: nil, event: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the Event resource by the update. 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 user does not provide a mask then all fields will be overwritten.
  • event (::Google::Cloud::VisionAI::V1::Event, ::Hash) — Required. The resource being updated.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::UpdateEventRequest.new

# Call the update_event method.
result = client.update_event 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

#update_series

def update_series(request, options = nil) -> ::Gapic::Operation
def update_series(update_mask: nil, series: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Event.

Overloads
def update_series(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_series via a request object, either of type UpdateSeriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::UpdateSeriesRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_series(update_mask: nil, series: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_series 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) — Required. Field mask is used to specify the fields to be overwritten in the Series resource by the update. 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 user does not provide a mask then all fields will be overwritten.
  • series (::Google::Cloud::VisionAI::V1::Series, ::Hash) — Required. The resource being updated
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::UpdateSeriesRequest.new

# Call the update_series method.
result = client.update_series 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

#update_stream

def update_stream(request, options = nil) -> ::Gapic::Operation
def update_stream(update_mask: nil, stream: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Stream.

Overloads
def update_stream(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_stream via a request object, either of type UpdateStreamRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::UpdateStreamRequest, ::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) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_stream(update_mask: nil, stream: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_stream 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) — Required. Field mask is used to specify the fields to be overwritten in the Stream resource by the update. 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 user does not provide a mask then all fields will be overwritten.
  • stream (::Google::Cloud::VisionAI::V1::Stream, ::Hash) — Required. The resource being updated.
  • request_id (::String) — 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/vision_ai/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::VisionAI::V1::StreamsService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::VisionAI::V1::UpdateStreamRequest.new

# Call the update_stream method.
result = client.update_stream 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