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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
def acquire_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
acquire_lease
via a request object, either of type
AcquireLeaseRequest or an equivalent Hash.
- 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
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).
- series (::String) — The series name.
- owner (::String) — The owner name.
- term (::Google::Protobuf::Duration, ::Hash) — The lease term.
- lease_type (::Google::Cloud::VisionAI::V1::LeaseType) — The lease type.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Lease)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new StreamingService REST client object.
- (config) — Configure the StreamingService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
- (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.
def release_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse
release_lease
via a request object, either of type
ReleaseLeaseRequest or an equivalent Hash.
- 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
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).
- id (::String) — Lease id.
- series (::String) — Series name.
- owner (::String) — Lease owner.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::ReleaseLeaseResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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.
def renew_lease(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Lease
renew_lease
via a request object, either of type
RenewLeaseRequest or an equivalent Hash.
- 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
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).
- id (::String) — Lease id.
- series (::String) — Series name.
- owner (::String) — Lease owner.
- term (::Google::Protobuf::Duration, ::Hash) — Lease term.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Lease)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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
- (String)