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

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

REST client for the StreamingService service.

Streaming service for receiving and sending packets.

Inherits

  • Object

Methods

.configure

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

Configure the StreamingService 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 StreamingService clients
::Google::Cloud::VisionAI::V1::StreamingService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#acquire_lease

def acquire_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
def acquire_lease(series: nil, owner: nil, term: nil, lease_type: nil) -> ::Google::Cloud::VisionAI::V1::Lease

AcquireLease acquires a lease.

Overloads
def acquire_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
Pass arguments to acquire_lease via a request object, either of type AcquireLeaseRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::AcquireLeaseRequest, ::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 acquire_lease(series: nil, owner: nil, term: nil, lease_type: nil) -> ::Google::Cloud::VisionAI::V1::Lease
Pass arguments to acquire_lease 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
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::StreamingService::Rest::Client.new

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

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

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

#configure

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

Configure the StreamingService 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

#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 StreamingService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::VisionAI::V1::StreamingService::Rest::Client.new do |config|
  config.timeout = 10.0
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)

#release_lease

def release_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse
def release_lease(id: nil, series: nil, owner: nil) -> ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse

RleaseLease releases a lease.

Overloads
def release_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse
Pass arguments to release_lease via a request object, either of type ReleaseLeaseRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::ReleaseLeaseRequest, ::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 release_lease(id: nil, series: nil, owner: nil) -> ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse
Pass arguments to release_lease 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
  • id (::String) — Lease id.
  • series (::String) — Series name.
  • owner (::String) — Lease owner.
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::StreamingService::Rest::Client.new

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

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

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

#renew_lease

def renew_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
def renew_lease(id: nil, series: nil, owner: nil, term: nil) -> ::Google::Cloud::VisionAI::V1::Lease

RenewLease renews a lease.

Overloads
def renew_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
Pass arguments to renew_lease via a request object, either of type RenewLeaseRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::VisionAI::V1::RenewLeaseRequest, ::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 renew_lease(id: nil, series: nil, owner: nil, term: nil) -> ::Google::Cloud::VisionAI::V1::Lease
Pass arguments to renew_lease 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
  • id (::String) — Lease id.
  • series (::String) — Series name.
  • owner (::String) — Lease owner.
  • term (::Google::Protobuf::Duration, ::Hash) — Lease term.
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::StreamingService::Rest::Client.new

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

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

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

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)