Reference documentation and code samples for the Vector Search V1 API class Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.
REST client for the DataObjectService service.
Service for creating and managing data objects.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the DataObjectService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DataObjectService clients ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.configure do |config| config.timeout = 10.0 end
#batch_create_data_objects
def batch_create_data_objects(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse
def batch_create_data_objects(parent: nil, requests: nil) -> ::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponseCreates a batch of dataObjects.
def batch_create_data_objects(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponsebatch_create_data_objects via a request object, either of type
BatchCreateDataObjectsRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest, ::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 batch_create_data_objects(parent: nil, requests: nil) -> ::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponsebatch_create_data_objects 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).
-
parent (::String) — Required. The resource name of the Collection to create the DataObjects in.
Format:
projects/{project}/locations/{location}/collections/{collection}. The parent field in the CreateDataObjectRequest messages must match this field. - requests (::Array<::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest, ::Hash>) — Required. The request message specifying the resources to create. A maximum of 1000 DataObjects can be created in a batch.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsRequest.new # Call the batch_create_data_objects method. result = client.batch_create_data_objects request # The returned object is of type Google::Cloud::VectorSearch::V1::BatchCreateDataObjectsResponse. p result
#batch_delete_data_objects
def batch_delete_data_objects(request, options = nil) -> ::Google::Protobuf::Empty
def batch_delete_data_objects(parent: nil, requests: nil) -> ::Google::Protobuf::EmptyDeletes dataObjects in a batch.
def batch_delete_data_objects(request, options = nil) -> ::Google::Protobuf::Emptybatch_delete_data_objects via a request object, either of type
BatchDeleteDataObjectsRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest, ::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 batch_delete_data_objects(parent: nil, requests: nil) -> ::Google::Protobuf::Emptybatch_delete_data_objects 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).
-
parent (::String) — Required. The resource name of the Collection to delete the DataObjects in.
Format:
projects/{project}/locations/{location}/collections/{collection}. - requests (::Array<::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest, ::Hash>) — Required. The request message specifying the resources to delete. A maximum of 1000 DataObjects can be deleted in a batch.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::BatchDeleteDataObjectsRequest.new # Call the batch_delete_data_objects method. result = client.batch_delete_data_objects request # The returned object is of type Google::Protobuf::Empty. p result
#batch_update_data_objects
def batch_update_data_objects(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse
def batch_update_data_objects(parent: nil, requests: nil) -> ::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponseUpdates dataObjects in a batch.
def batch_update_data_objects(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponsebatch_update_data_objects via a request object, either of type
BatchUpdateDataObjectsRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest, ::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 batch_update_data_objects(parent: nil, requests: nil) -> ::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponsebatch_update_data_objects 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).
-
parent (::String) — Required. The resource name of the Collection to update the DataObjects in.
Format:
projects/{project}/locations/{location}/collections/{collection}. The parent field in the UpdateDataObjectRequest messages must match this field. - requests (::Array<::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest, ::Hash>) — Required. The request message specifying the resources to update. A maximum of 1000 DataObjects can be updated in a batch.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsRequest.new # Call the batch_update_data_objects method. result = client.batch_update_data_objects request # The returned object is of type Google::Cloud::VectorSearch::V1::BatchUpdateDataObjectsResponse. p result
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the DataObjectService 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)
#create_data_object
def create_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObject
def create_data_object(parent: nil, data_object_id: nil, data_object: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectCreates a dataObject.
def create_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectcreate_data_object via a request object, either of type
CreateDataObjectRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest, ::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_data_object(parent: nil, data_object_id: nil, data_object: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectcreate_data_object 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).
-
parent (::String) — Required. The resource name of the Collection to create the DataObject in.
Format:
projects/{project}/locations/{location}/collections/{collection} -
data_object_id (::String) — Required. The id of the dataObject to create.
The id must be 1-63 characters long, and comply with
RFC1035.
Specifically, it must be 1-63 characters long and match the regular
expression
[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?. - data_object (::Google::Cloud::VectorSearch::V1::DataObject, ::Hash) — Required. The DataObject to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VectorSearch::V1::DataObject)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::CreateDataObjectRequest.new # Call the create_data_object method. result = client.create_data_object request # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject. p result
#delete_data_object
def delete_data_object(request, options = nil) -> ::Google::Protobuf::Empty
def delete_data_object(name: nil, etag: nil) -> ::Google::Protobuf::EmptyDeletes a dataObject.
def delete_data_object(request, options = nil) -> ::Google::Protobuf::Emptydelete_data_object via a request object, either of type
Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest, ::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_data_object(name: nil, etag: nil) -> ::Google::Protobuf::Emptydelete_data_object 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).
-
name (::String) — Required. The name of the DataObject resource to be deleted.
Format:
projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject} - etag (::String) — Optional. The current etag of the DataObject. If an etag is provided and does not match the current etag of the DataObject, deletion will be blocked and an ABORTED error will be returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest.new # Call the delete_data_object method. result = client.delete_data_object request # The returned object is of type Google::Protobuf::Empty. p result
#get_data_object
def get_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObject
def get_data_object(name: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectGets a data object.
def get_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectget_data_object via a request object, either of type
GetDataObjectRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::GetDataObjectRequest, ::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_data_object(name: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectget_data_object 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).
-
name (::String) — Required. The name of the DataObject resource.
Format:
projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VectorSearch::V1::DataObject)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::GetDataObjectRequest.new # Call the get_data_object method. result = client.get_data_object request # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new DataObjectService REST client object.
- (config) — Configure the DataObjectService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new do |config| config.timeout = 10.0 end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_data_object
def update_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObject
def update_data_object(data_object: nil, update_mask: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectUpdates a dataObject.
def update_data_object(request, options = nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectupdate_data_object via a request object, either of type
UpdateDataObjectRequest or an equivalent Hash.
- request (::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest, ::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_data_object(data_object: nil, update_mask: nil) -> ::Google::Cloud::VectorSearch::V1::DataObjectupdate_data_object 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).
- data_object (::Google::Cloud::VectorSearch::V1::DataObject, ::Hash) — Required. The DataObject which replaces the resource on the server.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The update mask applies to the resource. See google.protobuf.FieldMask.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VectorSearch::V1::DataObject)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/vector_search/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VectorSearch::V1::DataObjectService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest.new # Call the update_data_object method. result = client.update_data_object request # The returned object is of type Google::Cloud::VectorSearch::V1::DataObject. p result