Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.
REST client for the Warehouse service.
Service that manages media content + metadata for streaming.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the Warehouse Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Warehouse clients ::Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.configure do |config| config.timeout = 10.0 end
#add_collection_item
def add_collection_item(request, options = nil) -> ::Google::Cloud::VisionAI::V1::AddCollectionItemResponse
def add_collection_item(item: nil) -> ::Google::Cloud::VisionAI::V1::AddCollectionItemResponseAdds an item into a Collection.
def add_collection_item(request, options = nil) -> ::Google::Cloud::VisionAI::V1::AddCollectionItemResponseadd_collection_item via a request object, either of type
AddCollectionItemRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::AddCollectionItemRequest, ::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 add_collection_item(item: nil) -> ::Google::Cloud::VisionAI::V1::AddCollectionItemResponseadd_collection_item 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).
- item (::Google::Cloud::VisionAI::V1::CollectionItem, ::Hash) — Required. The item to be added.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::AddCollectionItemResponse)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::AddCollectionItemRequest.new # Call the add_collection_item method. result = client.add_collection_item request # The returned object is of type Google::Cloud::VisionAI::V1::AddCollectionItemResponse. p result
#analyze_asset
def analyze_asset(request, options = nil) -> ::Gapic::Operation
def analyze_asset(name: nil) -> ::Gapic::OperationAnalyze asset to power search capability.
def analyze_asset(request, options = nil) -> ::Gapic::Operationanalyze_asset via a request object, either of type
AnalyzeAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::AnalyzeAssetRequest, ::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 analyze_asset(name: nil) -> ::Gapic::Operationanalyze_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the asset to analyze.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::AnalyzeAssetRequest.new # Call the analyze_asset method. result = client.analyze_asset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#analyze_corpus
def analyze_corpus(request, options = nil) -> ::Gapic::Operation
def analyze_corpus(name: nil) -> ::Gapic::OperationAnalyzes a corpus.
def analyze_corpus(request, options = nil) -> ::Gapic::Operationanalyze_corpus via a request object, either of type
AnalyzeCorpusRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::AnalyzeCorpusRequest, ::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 analyze_corpus(name: nil) -> ::Gapic::Operationanalyze_corpus 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 parent corpus resource where the assets will be analyzed.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::AnalyzeCorpusRequest.new # Call the analyze_corpus method. result = client.analyze_corpus 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
#clip_asset
def clip_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ClipAssetResponse
def clip_asset(name: nil, temporal_partition: nil) -> ::Google::Cloud::VisionAI::V1::ClipAssetResponseSupported by STREAM_VIDEO corpus type. Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.
def clip_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::ClipAssetResponseclip_asset via a request object, either of type
ClipAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ClipAssetRequest, ::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 clip_asset(name: nil, temporal_partition: nil) -> ::Google::Cloud::VisionAI::V1::ClipAssetResponseclip_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the asset to request clips for.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} - temporal_partition (::Google::Cloud::VisionAI::V1::Partition::TemporalPartition, ::Hash) — Required. The time range to request clips for.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::ClipAssetResponse)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ClipAssetRequest.new # Call the clip_asset method. result = client.clip_asset request # The returned object is of type Google::Cloud::VisionAI::V1::ClipAssetResponse. p result
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the Warehouse 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_annotation
def create_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotation
def create_annotation(parent: nil, annotation: nil, annotation_id: nil) -> ::Google::Cloud::VisionAI::V1::AnnotationCreates annotation inside asset.
def create_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotationcreate_annotation via a request object, either of type
CreateAnnotationRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateAnnotationRequest, ::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_annotation(parent: nil, annotation: nil, annotation_id: nil) -> ::Google::Cloud::VisionAI::V1::Annotationcreate_annotation 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 parent resource where this annotation will be created.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} - annotation (::Google::Cloud::VisionAI::V1::Annotation, ::Hash) — Required. The annotation to create.
-
annotation_id (::String) — Optional. The ID to use for the annotation, which will become the final
component of the annotation's resource name if user choose to specify.
Otherwise, annotation id will be generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Annotation)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateAnnotationRequest.new # Call the create_annotation method. result = client.create_annotation request # The returned object is of type Google::Cloud::VisionAI::V1::Annotation. p result
#create_asset
def create_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Asset
def create_asset(parent: nil, asset: nil, asset_id: nil) -> ::Google::Cloud::VisionAI::V1::AssetCreates an asset inside corpus.
def create_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Assetcreate_asset via a request object, either of type
CreateAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateAssetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_asset(parent: nil, asset: nil, asset_id: nil) -> ::Google::Cloud::VisionAI::V1::Assetcreate_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent resource where this asset will be created.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id} - asset (::Google::Cloud::VisionAI::V1::Asset, ::Hash) — Required. The asset to create.
-
asset_id (::String) — Optional. The ID to use for the asset, which will become the final
component of the asset's resource name if user choose to specify.
Otherwise, asset id will be generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Asset)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateAssetRequest.new # Call the create_asset method. result = client.create_asset request # The returned object is of type Google::Cloud::VisionAI::V1::Asset. p result
#create_collection
def create_collection(request, options = nil) -> ::Gapic::Operation
def create_collection(parent: nil, collection: nil, collection_id: nil) -> ::Gapic::OperationCreates a collection.
def create_collection(request, options = nil) -> ::Gapic::Operationcreate_collection via a request object, either of type
CreateCollectionRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateCollectionRequest, ::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_collection(parent: nil, collection: nil, collection_id: nil) -> ::Gapic::Operationcreate_collection 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 parent resource where this collection will be created.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - collection (::Google::Cloud::VisionAI::V1::Collection, ::Hash) — Required. The collection resource to be created.
-
collection_id (::String) — Optional. The ID to use for the collection, which will become the final
component of the resource name if user choose to specify. Otherwise,
collection id will be generated by system.
This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateCollectionRequest.new # Call the create_collection method. result = client.create_collection 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_corpus
def create_corpus(request, options = nil) -> ::Gapic::Operation
def create_corpus(parent: nil, corpus: nil) -> ::Gapic::OperationCreates a corpus inside a project.
def create_corpus(request, options = nil) -> ::Gapic::Operationcreate_corpus via a request object, either of type
CreateCorpusRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateCorpusRequest, ::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_corpus(parent: nil, corpus: nil) -> ::Gapic::Operationcreate_corpus 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. Form:
projects/{project_number}/locations/{location_id} - corpus (::Google::Cloud::VisionAI::V1::Corpus, ::Hash) — Required. The corpus to be created.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateCorpusRequest.new # Call the create_corpus method. result = client.create_corpus 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_data_schema
def create_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchema
def create_data_schema(parent: nil, data_schema: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaCreates data schema inside corpus.
def create_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchemacreate_data_schema via a request object, either of type
CreateDataSchemaRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateDataSchemaRequest, ::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_schema(parent: nil, data_schema: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemacreate_data_schema 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 parent resource where this data schema will be created.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id} - data_schema (::Google::Cloud::VisionAI::V1::DataSchema, ::Hash) — Required. The data schema to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::DataSchema)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateDataSchemaRequest.new # Call the create_data_schema method. result = client.create_data_schema request # The returned object is of type Google::Cloud::VisionAI::V1::DataSchema. p result
#create_index
def create_index(request, options = nil) -> ::Gapic::Operation
def create_index(parent: nil, index_id: nil, index: nil) -> ::Gapic::OperationCreates an Index under the corpus.
def create_index(request, options = nil) -> ::Gapic::Operationcreate_index via a request object, either of type
CreateIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateIndexRequest, ::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_index(parent: nil, index_id: nil, index: nil) -> ::Gapic::Operationcreate_index 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. Value for the parent. The resource name of the Corpus under which
this index is created. Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id} -
index_id (::String) — Optional. The ID for the index. This will become the final resource name
for the index. If the user does not specify this value, it will be
generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.
- index (::Google::Cloud::VisionAI::V1::Index, ::Hash) — Required. The index being created.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateIndexRequest.new # Call the create_index method. result = client.create_index 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_index_endpoint
def create_index_endpoint(request, options = nil) -> ::Gapic::Operation
def create_index_endpoint(parent: nil, index_endpoint_id: nil, index_endpoint: nil) -> ::Gapic::OperationCreates an IndexEndpoint.
def create_index_endpoint(request, options = nil) -> ::Gapic::Operationcreate_index_endpoint via a request object, either of type
CreateIndexEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateIndexEndpointRequest, ::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_index_endpoint(parent: nil, index_endpoint_id: nil, index_endpoint: nil) -> ::Gapic::Operationcreate_index_endpoint 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. Format:
projects/{project}/locations/{location} -
index_endpoint_id (::String) — Optional. The ID to use for the IndexEndpoint, which will become the final
component of the IndexEndpoint's resource name if the user specifies it.
Otherwise, IndexEndpoint id will be autogenerated.
This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash (-). The first character must be a letter, the last must be a letter or a number.
- index_endpoint (::Google::Cloud::VisionAI::V1::IndexEndpoint, ::Hash) — Required. The resource being created.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateIndexEndpointRequest.new # Call the create_index_endpoint method. result = client.create_index_endpoint 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_search_config
def create_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfig
def create_search_config(parent: nil, search_config: nil, search_config_id: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigCreates a search configuration inside a corpus.
Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules ---
- Request.search_config_id must not be associated with an existing SearchConfig.
- Request must contain at least one non-empty search_criteria_property or facet_property.
- mapped_fields must not be empty, and must map to existing UGA keys.
- All mapped_fields must be of the same type.
- All mapped_fields must share the same granularity.
- All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
def create_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigcreate_search_config via a request object, either of type
CreateSearchConfigRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateSearchConfigRequest, ::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_search_config(parent: nil, search_config: nil, search_config_id: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigcreate_search_config 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 parent resource where this search configuration will be
created. Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id} - search_config (::Google::Cloud::VisionAI::V1::SearchConfig, ::Hash) — Required. The search config to create.
- search_config_id (::String) — Required. ID to use for the new search config. Will become the final component of the SearchConfig's resource name. This value should be up to 63 characters, and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last could be a letter or a number.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchConfig)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateSearchConfigRequest.new # Call the create_search_config method. result = client.create_search_config request # The returned object is of type Google::Cloud::VisionAI::V1::SearchConfig. p result
#create_search_hypernym
def create_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernym
def create_search_hypernym(parent: nil, search_hypernym: nil, search_hypernym_id: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymCreates a SearchHypernym inside a corpus.
def create_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymcreate_search_hypernym via a request object, either of type
CreateSearchHypernymRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::CreateSearchHypernymRequest, ::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_search_hypernym(parent: nil, search_hypernym: nil, search_hypernym_id: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymcreate_search_hypernym 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 parent resource where this SearchHypernym will be created.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - search_hypernym (::Google::Cloud::VisionAI::V1::SearchHypernym, ::Hash) — Required. The SearchHypernym to create.
- search_hypernym_id (::String) — Optional. The search hypernym id. If omitted, a random UUID will be generated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchHypernym)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::CreateSearchHypernymRequest.new # Call the create_search_hypernym method. result = client.create_search_hypernym request # The returned object is of type Google::Cloud::VisionAI::V1::SearchHypernym. p result
#delete_annotation
def delete_annotation(request, options = nil) -> ::Google::Protobuf::Empty
def delete_annotation(name: nil) -> ::Google::Protobuf::EmptyDeletes annotation inside asset.
def delete_annotation(request, options = nil) -> ::Google::Protobuf::Emptydelete_annotation via a request object, either of type
DeleteAnnotationRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteAnnotationRequest, ::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_annotation(name: nil) -> ::Google::Protobuf::Emptydelete_annotation 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 annotation to delete.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}
- (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/vision_ai/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteAnnotationRequest.new # Call the delete_annotation method. result = client.delete_annotation request # The returned object is of type Google::Protobuf::Empty. p result
#delete_asset
def delete_asset(request, options = nil) -> ::Gapic::Operation
def delete_asset(name: nil) -> ::Gapic::OperationDeletes asset inside corpus.
def delete_asset(request, options = nil) -> ::Gapic::Operationdelete_asset via a request object, either of type
DeleteAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteAssetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_asset(name: nil) -> ::Gapic::Operationdelete_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the asset to delete.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteAssetRequest.new # Call the delete_asset method. result = client.delete_asset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_collection
def delete_collection(request, options = nil) -> ::Gapic::Operation
def delete_collection(name: nil) -> ::Gapic::OperationDeletes a collection.
def delete_collection(request, options = nil) -> ::Gapic::Operationdelete_collection via a request object, either of type
DeleteCollectionRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteCollectionRequest, ::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_collection(name: nil) -> ::Gapic::Operationdelete_collection 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 collection to delete. Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteCollectionRequest.new # Call the delete_collection method. result = client.delete_collection 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_corpus
def delete_corpus(request, options = nil) -> ::Google::Protobuf::Empty
def delete_corpus(name: nil) -> ::Google::Protobuf::EmptyDeletes a corpus only if its empty. Returns empty response.
def delete_corpus(request, options = nil) -> ::Google::Protobuf::Emptydelete_corpus via a request object, either of type
DeleteCorpusRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteCorpusRequest, ::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_corpus(name: nil) -> ::Google::Protobuf::Emptydelete_corpus 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 resource name of the corpus to delete.
- (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/vision_ai/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteCorpusRequest.new # Call the delete_corpus method. result = client.delete_corpus request # The returned object is of type Google::Protobuf::Empty. p result
#delete_data_schema
def delete_data_schema(request, options = nil) -> ::Google::Protobuf::Empty
def delete_data_schema(name: nil) -> ::Google::Protobuf::EmptyDeletes data schema inside corpus.
def delete_data_schema(request, options = nil) -> ::Google::Protobuf::Emptydelete_data_schema via a request object, either of type
DeleteDataSchemaRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteDataSchemaRequest, ::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_schema(name: nil) -> ::Google::Protobuf::Emptydelete_data_schema 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 data schema to delete.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}
- (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/vision_ai/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteDataSchemaRequest.new # Call the delete_data_schema method. result = client.delete_data_schema request # The returned object is of type Google::Protobuf::Empty. p result
#delete_index
def delete_index(request, options = nil) -> ::Gapic::Operation
def delete_index(name: nil) -> ::Gapic::OperationDelete a single Index. In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.
def delete_index(request, options = nil) -> ::Gapic::Operationdelete_index via a request object, either of type
DeleteIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteIndexRequest, ::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_index(name: nil) -> ::Gapic::Operationdelete_index 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 index to delete.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteIndexRequest.new # Call the delete_index method. result = client.delete_index 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_index_endpoint
def delete_index_endpoint(request, options = nil) -> ::Gapic::Operation
def delete_index_endpoint(name: nil) -> ::Gapic::OperationDeletes an IndexEndpoint.
def delete_index_endpoint(request, options = nil) -> ::Gapic::Operationdelete_index_endpoint via a request object, either of type
DeleteIndexEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteIndexEndpointRequest, ::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_index_endpoint(name: nil) -> ::Gapic::Operationdelete_index_endpoint 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. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteIndexEndpointRequest.new # Call the delete_index_endpoint method. result = client.delete_index_endpoint 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_search_config
def delete_search_config(request, options = nil) -> ::Google::Protobuf::Empty
def delete_search_config(name: nil) -> ::Google::Protobuf::EmptyDeletes a search configuration inside a corpus.
For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.
def delete_search_config(request, options = nil) -> ::Google::Protobuf::Emptydelete_search_config via a request object, either of type
DeleteSearchConfigRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteSearchConfigRequest, ::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_search_config(name: nil) -> ::Google::Protobuf::Emptydelete_search_config 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 search configuration to delete.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}
- (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/vision_ai/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteSearchConfigRequest.new # Call the delete_search_config method. result = client.delete_search_config request # The returned object is of type Google::Protobuf::Empty. p result
#delete_search_hypernym
def delete_search_hypernym(request, options = nil) -> ::Google::Protobuf::Empty
def delete_search_hypernym(name: nil) -> ::Google::Protobuf::EmptyDeletes a SearchHypernym inside a corpus.
def delete_search_hypernym(request, options = nil) -> ::Google::Protobuf::Emptydelete_search_hypernym via a request object, either of type
DeleteSearchHypernymRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeleteSearchHypernymRequest, ::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_search_hypernym(name: nil) -> ::Google::Protobuf::Emptydelete_search_hypernym 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 SearchHypernym to delete.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}
- (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/vision_ai/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeleteSearchHypernymRequest.new # Call the delete_search_hypernym method. result = client.delete_search_hypernym request # The returned object is of type Google::Protobuf::Empty. p result
#deploy_index
def deploy_index(request, options = nil) -> ::Gapic::Operation
def deploy_index(index_endpoint: nil, deployed_index: nil) -> ::Gapic::OperationDeploys an Index to IndexEndpoint.
def deploy_index(request, options = nil) -> ::Gapic::Operationdeploy_index via a request object, either of type
DeployIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::DeployIndexRequest, ::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 deploy_index(index_endpoint: nil, deployed_index: nil) -> ::Gapic::Operationdeploy_index 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).
-
index_endpoint (::String) — Required. IndexEndpoint the index is deployed to.
Format:
projects/{project}/locations/{location}/indexEndpoints/{index_endpoint} - deployed_index (::Google::Cloud::VisionAI::V1::DeployedIndex, ::Hash) — Required. Index to deploy.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::DeployIndexRequest.new # Call the deploy_index method. result = client.deploy_index 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_hls_uri
def generate_hls_uri(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateHlsUriResponse
def generate_hls_uri(name: nil, temporal_partitions: nil, live_view_enabled: nil) -> ::Google::Cloud::VisionAI::V1::GenerateHlsUriResponseGenerates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.
def generate_hls_uri(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateHlsUriResponsegenerate_hls_uri via a request object, either of type
GenerateHlsUriRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GenerateHlsUriRequest, ::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_hls_uri(name: nil, temporal_partitions: nil, live_view_enabled: nil) -> ::Google::Cloud::VisionAI::V1::GenerateHlsUriResponsegenerate_hls_uri 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 resource name of the asset to request clips for.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} -
temporal_partitions (::Array<::Google::Cloud::VisionAI::V1::Partition::TemporalPartition, ::Hash>) — The time range to request clips for. Will be ignored if
get_live_viewis set to True. The total time range requested should be smaller than 24h. - live_view_enabled (::Boolean) — Option to exclusively show a livestream of the asset with up to 3 minutes of backlog data.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::GenerateHlsUriResponse)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GenerateHlsUriRequest.new # Call the generate_hls_uri method. result = client.generate_hls_uri request # The returned object is of type Google::Cloud::VisionAI::V1::GenerateHlsUriResponse. p result
#generate_retrieval_url
def generate_retrieval_url(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse
def generate_retrieval_url(name: nil) -> ::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponseGenerates a signed url for downloading the asset. For video warehouse, please see comment of UploadAsset about how to allow retrieval of cloud storage files in a different project.
def generate_retrieval_url(request, options = nil) -> ::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponsegenerate_retrieval_url via a request object, either of type
GenerateRetrievalUrlRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlRequest, ::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_retrieval_url(name: nil) -> ::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponsegenerate_retrieval_url 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 resource name of the asset to request signed url for.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GenerateRetrievalUrlRequest.new # Call the generate_retrieval_url method. result = client.generate_retrieval_url request # The returned object is of type Google::Cloud::VisionAI::V1::GenerateRetrievalUrlResponse. p result
#get_annotation
def get_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotation
def get_annotation(name: nil) -> ::Google::Cloud::VisionAI::V1::AnnotationReads annotation inside asset.
def get_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotationget_annotation via a request object, either of type
GetAnnotationRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetAnnotationRequest, ::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_annotation(name: nil) -> ::Google::Cloud::VisionAI::V1::Annotationget_annotation 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 annotation to retrieve.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Annotation)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetAnnotationRequest.new # Call the get_annotation method. result = client.get_annotation request # The returned object is of type Google::Cloud::VisionAI::V1::Annotation. p result
#get_asset
def get_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Asset
def get_asset(name: nil) -> ::Google::Cloud::VisionAI::V1::AssetReads an asset inside corpus.
def get_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Assetget_asset via a request object, either of type
GetAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetAssetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_asset(name: nil) -> ::Google::Cloud::VisionAI::V1::Assetget_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Asset)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetAssetRequest.new # Call the get_asset method. result = client.get_asset request # The returned object is of type Google::Cloud::VisionAI::V1::Asset. p result
#get_collection
def get_collection(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Collection
def get_collection(name: nil) -> ::Google::Cloud::VisionAI::V1::CollectionGets a collection.
def get_collection(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Collectionget_collection via a request object, either of type
GetCollectionRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetCollectionRequest, ::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_collection(name: nil) -> ::Google::Cloud::VisionAI::V1::Collectionget_collection 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 collection to retrieve. Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Collection)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetCollectionRequest.new # Call the get_collection method. result = client.get_collection request # The returned object is of type Google::Cloud::VisionAI::V1::Collection. p result
#get_corpus
def get_corpus(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Corpus
def get_corpus(name: nil) -> ::Google::Cloud::VisionAI::V1::CorpusGets corpus details inside a project.
def get_corpus(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Corpusget_corpus via a request object, either of type
GetCorpusRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetCorpusRequest, ::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_corpus(name: nil) -> ::Google::Cloud::VisionAI::V1::Corpusget_corpus 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 resource name of the corpus to retrieve.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Corpus)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetCorpusRequest.new # Call the get_corpus method. result = client.get_corpus request # The returned object is of type Google::Cloud::VisionAI::V1::Corpus. p result
#get_data_schema
def get_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchema
def get_data_schema(name: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaGets data schema inside corpus.
def get_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaget_data_schema via a request object, either of type
GetDataSchemaRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetDataSchemaRequest, ::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_schema(name: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaget_data_schema 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 data schema to retrieve.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::DataSchema)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetDataSchemaRequest.new # Call the get_data_schema method. result = client.get_data_schema request # The returned object is of type Google::Cloud::VisionAI::V1::DataSchema. p result
#get_index
def get_index(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Index
def get_index(name: nil) -> ::Google::Cloud::VisionAI::V1::IndexGets the details of a single Index under a Corpus.
def get_index(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Indexget_index via a request object, either of type
GetIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetIndexRequest, ::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_index(name: nil) -> ::Google::Cloud::VisionAI::V1::Indexget_index 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. Name of the Index resource.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Index)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetIndexRequest.new # Call the get_index method. result = client.get_index request # The returned object is of type Google::Cloud::VisionAI::V1::Index. p result
#get_index_endpoint
def get_index_endpoint(request, options = nil) -> ::Google::Cloud::VisionAI::V1::IndexEndpoint
def get_index_endpoint(name: nil) -> ::Google::Cloud::VisionAI::V1::IndexEndpointGets an IndexEndpoint.
def get_index_endpoint(request, options = nil) -> ::Google::Cloud::VisionAI::V1::IndexEndpointget_index_endpoint via a request object, either of type
GetIndexEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetIndexEndpointRequest, ::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_index_endpoint(name: nil) -> ::Google::Cloud::VisionAI::V1::IndexEndpointget_index_endpoint 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. Name of the IndexEndpoint resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::IndexEndpoint)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetIndexEndpointRequest.new # Call the get_index_endpoint method. result = client.get_index_endpoint request # The returned object is of type Google::Cloud::VisionAI::V1::IndexEndpoint. p result
#get_search_config
def get_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfig
def get_search_config(name: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigGets a search configuration inside a corpus.
def get_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigget_search_config via a request object, either of type
GetSearchConfigRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetSearchConfigRequest, ::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_search_config(name: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigget_search_config 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 search configuration to retrieve.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchConfig)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetSearchConfigRequest.new # Call the get_search_config method. result = client.get_search_config request # The returned object is of type Google::Cloud::VisionAI::V1::SearchConfig. p result
#get_search_hypernym
def get_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernym
def get_search_hypernym(name: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymGets a SearchHypernym inside a corpus.
def get_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymget_search_hypernym via a request object, either of type
GetSearchHypernymRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::GetSearchHypernymRequest, ::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_search_hypernym(name: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymget_search_hypernym 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 SearchHypernym to retrieve.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchHypernym)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::GetSearchHypernymRequest.new # Call the get_search_hypernym method. result = client.get_search_hypernym request # The returned object is of type Google::Cloud::VisionAI::V1::SearchHypernym. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::ClientGet the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#import_assets
def import_assets(request, options = nil) -> ::Gapic::Operation
def import_assets(assets_gcs_uri: nil, parent: nil) -> ::Gapic::OperationImports assets (images plus annotations) from a meta file on cloud storage. Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.
def import_assets(request, options = nil) -> ::Gapic::Operationimport_assets via a request object, either of type
ImportAssetsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ImportAssetsRequest, ::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 import_assets(assets_gcs_uri: nil, parent: nil) -> ::Gapic::Operationimport_assets via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
assets_gcs_uri (::String) —
The file contains all assets information to be imported.
- The file is in JSONL format.
- Each line corresponding to one asset.
- Each line will be converted into InputImageAsset proto.
-
parent (::String) — Required. The parent corpus resource where the assets will be imported.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ImportAssetsRequest.new # Call the import_assets method. result = client.import_assets 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
#index_asset
def index_asset(request, options = nil) -> ::Gapic::Operation
def index_asset(name: nil, index: nil) -> ::Gapic::OperationIndex one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
def index_asset(request, options = nil) -> ::Gapic::Operationindex_asset via a request object, either of type
IndexAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::IndexAssetRequest, ::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 index_asset(name: nil, index: nil) -> ::Gapic::Operationindex_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the asset to index.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} -
index (::String) — Optional. The name of the index.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::IndexAssetRequest.new # Call the index_asset method. result = client.index_asset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#initialize
def initialize() { |config| ... } -> ClientCreate a new Warehouse REST client object.
- (config) — Configure the Warehouse client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::VisionAI::V1::Warehouse::Rest::Client.new do |config| config.timeout = 10.0 end
#list_annotations
def list_annotations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>
def list_annotations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>Lists a list of annotations inside asset.
def list_annotations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>list_annotations via a request object, either of type
ListAnnotationsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListAnnotationsRequest, ::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_annotations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>list_annotations 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) — The parent, which owns this collection of annotations.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - page_size (::Integer) — The maximum number of annotations to return. The service may return fewer than this value. If unspecified, at most 50 annotations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListAnnotationscall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListAnnotationsmust match the call that provided the page token. -
filter (::String) — The filter applied to the returned list.
We only support filtering for the following fields:
For corpus of STREAM_VIDEO type:
partition.temporal_partition.start_time,partition.temporal_partition.end_time, andkey. For corpus of VIDEO_ON_DEMAND type,partition.relative_temporal_partition.start_offset,partition.relative_temporal_partition.end_offset, andkey. For corpus of IMAGE type, onlykeyis supported. Timestamps are specified in the RFC-3339 format, and only one restriction may be applied per field, joined by conjunctions. Format: "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND key = "example_key""
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Annotation>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListAnnotationsRequest.new # Call the list_annotations method. result = client.list_annotations 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::Annotation. p item end
#list_assets
def list_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>
def list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>Lists an list of assets inside corpus.
def list_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>list_assets via a request object, either of type
ListAssetsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListAssetsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>list_assets via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent, which owns this collection of assets.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - page_size (::Integer) — The maximum number of assets to return. The service may return fewer than this value. If unspecified, at most 50 assets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListAssetscall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListAssetsmust match the call that provided the page token. - filter (::String) — The filter applied to the returned list. Only the following filterings are supported: "assets_with_contents = true", which returns assets with contents uploaded; "assets_with_contents = false", which returns assets without contents.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Asset>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListAssetsRequest.new # Call the list_assets method. result = client.list_assets request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::VisionAI::V1::Asset. p item end
#list_collections
def list_collections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>
def list_collections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>Lists collections inside a corpus.
def list_collections(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>list_collections via a request object, either of type
ListCollectionsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListCollectionsRequest, ::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_collections(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>list_collections 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 parent corpus. Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - page_size (::Integer) — The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListCollectionsRequestcall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListCollectionsRequestmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Collection>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListCollectionsRequest.new # Call the list_collections method. result = client.list_collections 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::Collection. p item end
#list_corpora
def list_corpora(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>
def list_corpora(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>Lists all corpora in a project.
def list_corpora(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>list_corpora via a request object, either of type
ListCorporaRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListCorporaRequest, ::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_corpora(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>list_corpora 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 project from which to list corpora.
- page_size (::Integer) — Requested page size. API may return fewer results than requested. If negative, INVALID_ARGUMENT error will be returned. If unspecified or 0, API will pick a default size, which is 10. If the requested page size is larger than the maximum size, API will pick use the maximum size, which is 20.
- page_token (::String) — A token identifying a page of results for the server to return. Typically obtained via ListCorporaResponse.next_page_token of the previous Warehouse.ListCorpora call.
-
filter (::String) — The filter applied to the returned corpora list.
Only the following restrictions are supported:
type=<Corpus.Type>,type!=<Corpus.Type>.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Corpus>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListCorporaRequest.new # Call the list_corpora method. result = client.list_corpora 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::Corpus. p item end
#list_data_schemas
def list_data_schemas(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>
def list_data_schemas(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>Lists a list of data schemas inside corpus.
def list_data_schemas(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>list_data_schemas via a request object, either of type
ListDataSchemasRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListDataSchemasRequest, ::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_data_schemas(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>list_data_schemas 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 parent, which owns this collection of data schemas.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id} - page_size (::Integer) — The maximum number of data schemas to return. The service may return fewer than this value. If unspecified, at most 50 data schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListDataSchemascall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListDataSchemasmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::DataSchema>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListDataSchemasRequest.new # Call the list_data_schemas method. result = client.list_data_schemas 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::DataSchema. p item end
#list_index_endpoints
def list_index_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>
def list_index_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>Lists all IndexEndpoints in a project.
def list_index_endpoints(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>list_index_endpoints via a request object, either of type
ListIndexEndpointsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListIndexEndpointsRequest, ::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_index_endpoints(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>list_index_endpoints 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. Format:
projects/{project}/locations/{location} - page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. The service may return fewer than this value. If unspecified, a page size of 50 will be used. The maximum value is 1000; values above 1000 will be coerced to 1000.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
-
filter (::String) — Optional. The filter applied to the returned list.
We only support filtering for the
deployed_image_index.image_indexfield. However, to filter by a corpus instead of an image index, simply usedeployed_image_index.corpus, which will return all endpoints withdeployed_image_index.image_indexinside of the given corpus. A basic filter on image index would look like: deployed_image_index.image_index = "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" A basic filter on corpus would look like: deployed_image_index.corpus = "projects/123/locations/us-central1/corpora/my_corpus"
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexEndpoint>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListIndexEndpointsRequest.new # Call the list_index_endpoints method. result = client.list_index_endpoints 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::IndexEndpoint. p item end
#list_indexes
def list_indexes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>
def list_indexes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>List all Indexes in a given Corpus.
def list_indexes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>list_indexes via a request object, either of type
ListIndexesRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListIndexesRequest, ::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_indexes(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>list_indexes 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 parent corpus that owns this collection of indexes.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - page_size (::Integer) — The maximum number of indexes to return. The service may return fewer than this value. If unspecified, at most 50 indexes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListIndexescall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListIndexesmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::Index>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListIndexesRequest.new # Call the list_indexes method. result = client.list_indexes 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::Index. p item end
#list_search_configs
def list_search_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>
def list_search_configs(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>Lists all search configurations inside a corpus.
def list_search_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>list_search_configs via a request object, either of type
ListSearchConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListSearchConfigsRequest, ::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_search_configs(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>list_search_configs 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 parent, which owns this collection of search configurations.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - page_size (::Integer) — The maximum number of search configurations to return. The service may return fewer than this value. If unspecified, a page size of 50 will be used. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ListSearchConfigscall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListSearchConfigsmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchConfig>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListSearchConfigsRequest.new # Call the list_search_configs method. result = client.list_search_configs 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::SearchConfig. p item end
#list_search_hypernyms
def list_search_hypernyms(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>
def list_search_hypernyms(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>Lists SearchHypernyms inside a corpus.
def list_search_hypernyms(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>list_search_hypernyms via a request object, either of type
ListSearchHypernymsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ListSearchHypernymsRequest, ::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_search_hypernyms(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>list_search_hypernyms 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 parent, which owns this collection of SearchHypernyms.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus} - page_size (::Integer) — The maximum number of SearchHypernyms returned. The service may return fewer than this value. If unspecified, a page size of 50 will be used. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
SearchHypernymcall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
SearchHypernymmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchHypernym>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ListSearchHypernymsRequest.new # Call the list_search_hypernyms method. result = client.list_search_hypernyms 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::SearchHypernym. p item 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)
#operations_client
def operations_client() -> ::Google::Cloud::VisionAI::V1::Warehouse::Rest::OperationsGet the associated client for long-running operations.
#remove_collection_item
def remove_collection_item(request, options = nil) -> ::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse
def remove_collection_item(item: nil) -> ::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponseRemoves an item from a collection.
def remove_collection_item(request, options = nil) -> ::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponseremove_collection_item via a request object, either of type
RemoveCollectionItemRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::RemoveCollectionItemRequest, ::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 remove_collection_item(item: nil) -> ::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponseremove_collection_item 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).
- item (::Google::Cloud::VisionAI::V1::CollectionItem, ::Hash) — Required. The item to be removed.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::RemoveCollectionItemRequest.new # Call the remove_collection_item method. result = client.remove_collection_item request # The returned object is of type Google::Cloud::VisionAI::V1::RemoveCollectionItemResponse. p result
#remove_index_asset
def remove_index_asset(request, options = nil) -> ::Gapic::Operation
def remove_index_asset(name: nil, index: nil) -> ::Gapic::OperationRemove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
def remove_index_asset(request, options = nil) -> ::Gapic::Operationremove_index_asset via a request object, either of type
RemoveIndexAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::RemoveIndexAssetRequest, ::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 remove_index_asset(name: nil, index: nil) -> ::Gapic::Operationremove_index_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the asset to index.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} -
index (::String) — Optional. The name of the index.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::RemoveIndexAssetRequest.new # Call the remove_index_asset method. result = client.remove_index_asset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#search_assets
def search_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>
def search_assets(schema_key_sorting_strategy: nil, corpus: nil, page_size: nil, page_token: nil, content_time_ranges: nil, criteria: nil, facet_selections: nil, result_annotation_keys: nil, search_query: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>Search media asset.
def search_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>search_assets via a request object, either of type
SearchAssetsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::SearchAssetsRequest, ::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 search_assets(schema_key_sorting_strategy: nil, corpus: nil, page_size: nil, page_token: nil, content_time_ranges: nil, criteria: nil, facet_selections: nil, result_annotation_keys: nil, search_query: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>search_assets via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- schema_key_sorting_strategy (::Google::Cloud::VisionAI::V1::SchemaKeySortingStrategy, ::Hash) — Sort by the value under the data schema key.
-
corpus (::String) — Required. The parent corpus to search.
Format:
projects/{project_id}/locations/{location_id}/corpora/{corpus_id} - page_size (::Integer) — The number of results to be returned in this page. If it's 0, the server will decide the appropriate page_size.
- page_token (::String) — The continuation token to fetch the next page. If empty, it means it is fetching the first page.
- content_time_ranges (::Google::Cloud::VisionAI::V1::DateTimeRangeArray, ::Hash) — Time ranges that matching video content must fall within. If no ranges are provided, there will be no time restriction. This field is treated just like the criteria below, but defined separately for convenience as it is used frequently. Note that if the end_time is in the future, it will be clamped to the time the request was received.
- criteria (::Array<::Google::Cloud::VisionAI::V1::Criteria, ::Hash>) — Criteria applied to search results.
- facet_selections (::Array<::Google::Cloud::VisionAI::V1::FacetGroup, ::Hash>) — Stores most recent facet selection state. Only facet groups with user's selection will be presented here. Selection state is either selected or unselected. Only selected facet buckets will be used as search criteria.
- result_annotation_keys (::Array<::String>) — A list of annotation keys to specify the annotations to be retrieved and returned with each search result. Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search strategy must not be NO_SEARCH.
- search_query (::String) — Global search query. Allows user to search assets without needing to specify which field the value belongs to.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::SearchAssetsRequest.new # Call the search_assets method. result = client.search_assets request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::VisionAI::V1::SearchResultItem. p item end
#search_index_endpoint
def search_index_endpoint(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>
def search_index_endpoint(image_query: nil, text_query: nil, index_endpoint: nil, criteria: nil, exclusion_criteria: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>Search a deployed index endpoint (IMAGE corpus type only).
def search_index_endpoint(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>search_index_endpoint via a request object, either of type
SearchIndexEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::SearchIndexEndpointRequest, ::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 search_index_endpoint(image_query: nil, text_query: nil, index_endpoint: nil, criteria: nil, exclusion_criteria: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>search_index_endpoint 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).
-
image_query (::Google::Cloud::VisionAI::V1::ImageQuery, ::Hash) — An image-only query.
Note: The following parameters are mutually exclusive:
image_query,text_query. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. -
text_query (::String) — A text-only query.
Note: The following parameters are mutually exclusive:
text_query,image_query. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. -
index_endpoint (::String) — Required. The index endpoint to search.
Format:
projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id} - criteria (::Array<::Google::Cloud::VisionAI::V1::Criteria, ::Hash>) — Criteria applied to search results.
-
exclusion_criteria (::Array<::Google::Cloud::VisionAI::V1::Criteria, ::Hash>) — Criteria to exclude from search results.
Note that
fetch_matched_annotationswill be ignored. - page_size (::Integer) — Requested page size. API may return fewer results than requested. If negative, INVALID_ARGUMENT error will be returned. If unspecified or 0, API will pick a default size, which is 10. If the requested page size is larger than the maximum size, API will pick the maximum size, which is 100.
- page_token (::String) — The continuation token to fetch the next page. If empty, it means it is fetching the first page.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::SearchResultItem>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::SearchIndexEndpointRequest.new # Call the search_index_endpoint method. result = client.search_index_endpoint 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::SearchResultItem. p item end
#undeploy_index
def undeploy_index(request, options = nil) -> ::Gapic::Operation
def undeploy_index(index_endpoint: nil) -> ::Gapic::OperationUndeploys an Index from IndexEndpoint.
def undeploy_index(request, options = nil) -> ::Gapic::Operationundeploy_index via a request object, either of type
UndeployIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UndeployIndexRequest, ::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 undeploy_index(index_endpoint: nil) -> ::Gapic::Operationundeploy_index 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).
-
index_endpoint (::String) — Required. Resource name of the IndexEndpoint resource on which the
undeployment will act. Format:
projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UndeployIndexRequest.new # Call the undeploy_index method. result = client.undeploy_index 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
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_annotation
def update_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotation
def update_annotation(annotation: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::AnnotationUpdates annotation inside asset.
def update_annotation(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Annotationupdate_annotation via a request object, either of type
UpdateAnnotationRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateAnnotationRequest, ::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_annotation(annotation: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::Annotationupdate_annotation 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).
-
annotation (::Google::Cloud::VisionAI::V1::Annotation, ::Hash) — Required. The annotation to update.
The annotation's
namefield is used to identify the annotation to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Annotation)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateAnnotationRequest.new # Call the update_annotation method. result = client.update_annotation request # The returned object is of type Google::Cloud::VisionAI::V1::Annotation. p result
#update_asset
def update_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Asset
def update_asset(asset: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::AssetUpdates an asset inside corpus.
def update_asset(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Assetupdate_asset via a request object, either of type
UpdateAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateAssetRequest, ::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_asset(asset: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::Assetupdate_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
asset (::Google::Cloud::VisionAI::V1::Asset, ::Hash) — Required. The asset to update.
The asset's
namefield is used to identify the asset to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Asset)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateAssetRequest.new # Call the update_asset method. result = client.update_asset request # The returned object is of type Google::Cloud::VisionAI::V1::Asset. p result
#update_collection
def update_collection(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Collection
def update_collection(collection: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::CollectionUpdates a collection.
def update_collection(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Collectionupdate_collection via a request object, either of type
UpdateCollectionRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateCollectionRequest, ::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_collection(collection: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::Collectionupdate_collection 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).
-
collection (::Google::Cloud::VisionAI::V1::Collection, ::Hash) — Required. The collection to update.
The collection's
namefield is used to identify the collection to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection} -
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
The list of fields to be updated.
- Unset
update_maskor setupdate_maskto be a single "*" only will update all updatable fields with the value provided incollection. - To update
display_namevalue to empty string, set it in thecollectionto empty string, and setupdate_maskwith "display_name". Same applies to other updatable string fields in thecollection.
- Unset
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Collection)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateCollectionRequest.new # Call the update_collection method. result = client.update_collection request # The returned object is of type Google::Cloud::VisionAI::V1::Collection. p result
#update_corpus
def update_corpus(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Corpus
def update_corpus(corpus: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::CorpusUpdates a corpus in a project.
def update_corpus(request, options = nil) -> ::Google::Cloud::VisionAI::V1::Corpusupdate_corpus via a request object, either of type
UpdateCorpusRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateCorpusRequest, ::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_corpus(corpus: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::Corpusupdate_corpus 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).
- corpus (::Google::Cloud::VisionAI::V1::Corpus, ::Hash) — Required. The corpus which replaces the resource on the server.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::Corpus)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateCorpusRequest.new # Call the update_corpus method. result = client.update_corpus request # The returned object is of type Google::Cloud::VisionAI::V1::Corpus. p result
#update_data_schema
def update_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchema
def update_data_schema(data_schema: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaUpdates data schema inside corpus.
def update_data_schema(request, options = nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaupdate_data_schema via a request object, either of type
UpdateDataSchemaRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateDataSchemaRequest, ::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_schema(data_schema: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::DataSchemaupdate_data_schema 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_schema (::Google::Cloud::VisionAI::V1::DataSchema, ::Hash) — Required. The data schema's
namefield is used to identify the data schema to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::DataSchema)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateDataSchemaRequest.new # Call the update_data_schema method. result = client.update_data_schema request # The returned object is of type Google::Cloud::VisionAI::V1::DataSchema. p result
#update_index
def update_index(request, options = nil) -> ::Gapic::Operation
def update_index(index: nil, update_mask: nil) -> ::Gapic::OperationUpdates an Index under the corpus. Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.
def update_index(request, options = nil) -> ::Gapic::Operationupdate_index via a request object, either of type
UpdateIndexRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateIndexRequest, ::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_index(index: nil, update_mask: nil) -> ::Gapic::Operationupdate_index 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).
- index (::Google::Cloud::VisionAI::V1::Index, ::Hash) — Required. The resource being updated.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the Index resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field of the resource will be overwritten if it is in the mask. Empty field mask is not allowed. If the mask is "*", it triggers a full update of the index, and also a whole rebuild of index data.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateIndexRequest.new # Call the update_index method. result = client.update_index 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_index_endpoint
def update_index_endpoint(request, options = nil) -> ::Gapic::Operation
def update_index_endpoint(index_endpoint: nil, update_mask: nil) -> ::Gapic::OperationUpdates an IndexEndpoint.
def update_index_endpoint(request, options = nil) -> ::Gapic::Operationupdate_index_endpoint via a request object, either of type
UpdateIndexEndpointRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateIndexEndpointRequest, ::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_index_endpoint(index_endpoint: nil, update_mask: nil) -> ::Gapic::Operationupdate_index_endpoint 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).
- index_endpoint (::Google::Cloud::VisionAI::V1::IndexEndpoint, ::Hash) — Required. The resource being updated.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the IndexEndpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field of the resource will be overwritten if it is in the mask. Empty field mask is not allowed. If the mask is "*", then this is a full replacement of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateIndexEndpointRequest.new # Call the update_index_endpoint method. result = client.update_index_endpoint 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_search_config
def update_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfig
def update_search_config(search_config: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigUpdates a search configuration inside a corpus.
Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules ---
- Request.search_configuration.name must already exist.
- Request must contain at least one non-empty search_criteria_property or facet_property.
- mapped_fields must not be empty, and must map to existing UGA keys.
- All mapped_fields must be of the same type.
- All mapped_fields must share the same granularity.
- All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
def update_search_config(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigupdate_search_config via a request object, either of type
UpdateSearchConfigRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateSearchConfigRequest, ::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_search_config(search_config: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::SearchConfigupdate_search_config 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).
-
search_config (::Google::Cloud::VisionAI::V1::SearchConfig, ::Hash) — Required. The search configuration to update.
The search configuration's
namefield is used to identify the resource to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated. If left unset, all field paths will be updated/overwritten.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchConfig)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateSearchConfigRequest.new # Call the update_search_config method. result = client.update_search_config request # The returned object is of type Google::Cloud::VisionAI::V1::SearchConfig. p result
#update_search_hypernym
def update_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernym
def update_search_hypernym(search_hypernym: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymUpdates a SearchHypernym inside a corpus.
def update_search_hypernym(request, options = nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymupdate_search_hypernym via a request object, either of type
UpdateSearchHypernymRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UpdateSearchHypernymRequest, ::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_search_hypernym(search_hypernym: nil, update_mask: nil) -> ::Google::Cloud::VisionAI::V1::SearchHypernymupdate_search_hypernym 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).
-
search_hypernym (::Google::Cloud::VisionAI::V1::SearchHypernym, ::Hash) — Required. The SearchHypernym to update.
The search hypernym's
namefield is used to identify the search hypernym to be updated. Format:projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated. If left unset, all field paths will be updated/overwritten.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::VisionAI::V1::SearchHypernym)
- 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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UpdateSearchHypernymRequest.new # Call the update_search_hypernym method. result = client.update_search_hypernym request # The returned object is of type Google::Cloud::VisionAI::V1::SearchHypernym. p result
#upload_asset
def upload_asset(request, options = nil) -> ::Gapic::Operation
def upload_asset(name: nil, asset_source: nil) -> ::Gapic::OperationUpload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users who call this API have read access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and grant the read access of the cloud storage files to that service account.
def upload_asset(request, options = nil) -> ::Gapic::Operationupload_asset via a request object, either of type
UploadAssetRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::UploadAssetRequest, ::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 upload_asset(name: nil, asset_source: nil) -> ::Gapic::Operationupload_asset via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the asset to upload.
Format:
projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id} - asset_source (::Google::Cloud::VisionAI::V1::AssetSource, ::Hash) — The source of the asset.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::UploadAssetRequest.new # Call the upload_asset method. result = client.upload_asset request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#view_collection_items
def view_collection_items(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>
def view_collection_items(collection: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>View items inside a collection.
def view_collection_items(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>view_collection_items via a request object, either of type
ViewCollectionItemsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ViewCollectionItemsRequest, ::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 view_collection_items(collection: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>view_collection_items 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).
-
collection (::String) — Required. The collection to view. Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection} - page_size (::Integer) — The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ViewCollectionItemsRequestcall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ViewCollectionItemsRequestmust match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::CollectionItem>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ViewCollectionItemsRequest.new # Call the view_collection_items method. result = client.view_collection_items 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::CollectionItem. p item end
#view_indexed_assets
def view_indexed_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>
def view_indexed_assets(index: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>Lists assets inside an index.
def view_indexed_assets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>view_indexed_assets via a request object, either of type
ViewIndexedAssetsRequest or an equivalent Hash.
- request (::Google::Cloud::VisionAI::V1::ViewIndexedAssetsRequest, ::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 view_indexed_assets(index: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>view_indexed_assets via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
index (::String) — Required. The index that owns this collection of assets.
Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index} - page_size (::Integer) — The maximum number of assets to return. The service may return fewer than this value. If unspecified, at most 50 assets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — A page token, received from a previous
ViewIndexedAssetscall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ViewIndexedAssetsmust match the call that provided the page token. - filter (::String) — The filter applied to the returned list. Only the following filterings are supported: "asset_id = xxxx", which returns asset with specified id. "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::VisionAI::V1::IndexedAsset>)
- (::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::Warehouse::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::VisionAI::V1::ViewIndexedAssetsRequest.new # Call the view_indexed_assets method. result = client.view_indexed_assets request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::VisionAI::V1::IndexedAsset. p item end