Class WarehouseGrpc.WarehouseFutureStub (0.3.0)

public static final class WarehouseGrpc.WarehouseFutureStub extends AbstractFutureStub<WarehouseGrpc.WarehouseFutureStub>

A stub to allow clients to do ListenableFuture-style rpc calls to service Warehouse.

Service that manages media content + metadata for streaming.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractFutureStub > WarehouseGrpc.WarehouseFutureStub

Methods

addCollectionItem(AddCollectionItemRequest request)

public ListenableFuture<AddCollectionItemResponse> addCollectionItem(AddCollectionItemRequest request)

Adds an item into a Collection.

Parameter
Name Description
request AddCollectionItemRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<AddCollectionItemResponse>

analyzeAsset(AnalyzeAssetRequest request)

public ListenableFuture<Operation> analyzeAsset(AnalyzeAssetRequest request)

Analyze asset to power search capability.

Parameter
Name Description
request AnalyzeAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

analyzeCorpus(AnalyzeCorpusRequest request)

public ListenableFuture<Operation> analyzeCorpus(AnalyzeCorpusRequest request)

Analyzes a corpus.

Parameter
Name Description
request AnalyzeCorpusRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

build(Channel channel, CallOptions callOptions)

protected WarehouseGrpc.WarehouseFutureStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
WarehouseGrpc.WarehouseFutureStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

clipAsset(ClipAssetRequest request)

public ListenableFuture<ClipAssetResponse> clipAsset(ClipAssetRequest request)

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.

Parameter
Name Description
request ClipAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ClipAssetResponse>

createAnnotation(CreateAnnotationRequest request)

public ListenableFuture<Annotation> createAnnotation(CreateAnnotationRequest request)

Creates annotation inside asset.

Parameter
Name Description
request CreateAnnotationRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Annotation>

createAsset(CreateAssetRequest request)

public ListenableFuture<Asset> createAsset(CreateAssetRequest request)

Creates an asset inside corpus.

Parameter
Name Description
request CreateAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Asset>

createCollection(CreateCollectionRequest request)

public ListenableFuture<Operation> createCollection(CreateCollectionRequest request)

Creates a collection.

Parameter
Name Description
request CreateCollectionRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createCorpus(CreateCorpusRequest request)

public ListenableFuture<Operation> createCorpus(CreateCorpusRequest request)

Creates a corpus inside a project.

Parameter
Name Description
request CreateCorpusRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createDataSchema(CreateDataSchemaRequest request)

public ListenableFuture<DataSchema> createDataSchema(CreateDataSchemaRequest request)

Creates data schema inside corpus.

Parameter
Name Description
request CreateDataSchemaRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<DataSchema>

createIndex(CreateIndexRequest request)

public ListenableFuture<Operation> createIndex(CreateIndexRequest request)

Creates an Index under the corpus.

Parameter
Name Description
request CreateIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createIndexEndpoint(CreateIndexEndpointRequest request)

public ListenableFuture<Operation> createIndexEndpoint(CreateIndexEndpointRequest request)

Creates an IndexEndpoint.

Parameter
Name Description
request CreateIndexEndpointRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

createSearchConfig(CreateSearchConfigRequest request)

public ListenableFuture<SearchConfig> createSearchConfig(CreateSearchConfigRequest request)

Creates a search configuration inside a corpus. Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules ---

  1. Request.search_config_id must not be associated with an existing SearchConfig.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameter
Name Description
request CreateSearchConfigRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchConfig>

createSearchHypernym(CreateSearchHypernymRequest request)

public ListenableFuture<SearchHypernym> createSearchHypernym(CreateSearchHypernymRequest request)

Creates a SearchHypernym inside a corpus.

Parameter
Name Description
request CreateSearchHypernymRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchHypernym>

deleteAnnotation(DeleteAnnotationRequest request)

public ListenableFuture<Empty> deleteAnnotation(DeleteAnnotationRequest request)

Deletes annotation inside asset.

Parameter
Name Description
request DeleteAnnotationRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteAsset(DeleteAssetRequest request)

public ListenableFuture<Operation> deleteAsset(DeleteAssetRequest request)

Deletes asset inside corpus.

Parameter
Name Description
request DeleteAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteCollection(DeleteCollectionRequest request)

public ListenableFuture<Operation> deleteCollection(DeleteCollectionRequest request)

Deletes a collection.

Parameter
Name Description
request DeleteCollectionRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteCorpus(DeleteCorpusRequest request)

public ListenableFuture<Empty> deleteCorpus(DeleteCorpusRequest request)

Deletes a corpus only if its empty. Returns empty response.

Parameter
Name Description
request DeleteCorpusRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteDataSchema(DeleteDataSchemaRequest request)

public ListenableFuture<Empty> deleteDataSchema(DeleteDataSchemaRequest request)

Deletes data schema inside corpus.

Parameter
Name Description
request DeleteDataSchemaRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteIndex(DeleteIndexRequest request)

public ListenableFuture<Operation> deleteIndex(DeleteIndexRequest request)

Delete a single Index. In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.

Parameter
Name Description
request DeleteIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteIndexEndpoint(DeleteIndexEndpointRequest request)

public ListenableFuture<Operation> deleteIndexEndpoint(DeleteIndexEndpointRequest request)

Deletes an IndexEndpoint.

Parameter
Name Description
request DeleteIndexEndpointRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

deleteSearchConfig(DeleteSearchConfigRequest request)

public ListenableFuture<Empty> deleteSearchConfig(DeleteSearchConfigRequest request)

Deletes a search configuration inside a corpus. For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Parameter
Name Description
request DeleteSearchConfigRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deleteSearchHypernym(DeleteSearchHypernymRequest request)

public ListenableFuture<Empty> deleteSearchHypernym(DeleteSearchHypernymRequest request)

Deletes a SearchHypernym inside a corpus.

Parameter
Name Description
request DeleteSearchHypernymRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Empty>

deployIndex(DeployIndexRequest request)

public ListenableFuture<Operation> deployIndex(DeployIndexRequest request)

Deploys an Index to IndexEndpoint.

Parameter
Name Description
request DeployIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

generateHlsUri(GenerateHlsUriRequest request)

public ListenableFuture<GenerateHlsUriResponse> generateHlsUri(GenerateHlsUriRequest request)

Generates 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.

Parameter
Name Description
request GenerateHlsUriRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<GenerateHlsUriResponse>

generateRetrievalUrl(GenerateRetrievalUrlRequest request)

public ListenableFuture<GenerateRetrievalUrlResponse> generateRetrievalUrl(GenerateRetrievalUrlRequest request)

Generates 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.

Parameter
Name Description
request GenerateRetrievalUrlRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<GenerateRetrievalUrlResponse>

getAnnotation(GetAnnotationRequest request)

public ListenableFuture<Annotation> getAnnotation(GetAnnotationRequest request)

Reads annotation inside asset.

Parameter
Name Description
request GetAnnotationRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Annotation>

getAsset(GetAssetRequest request)

public ListenableFuture<Asset> getAsset(GetAssetRequest request)

Reads an asset inside corpus.

Parameter
Name Description
request GetAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Asset>

getCollection(GetCollectionRequest request)

public ListenableFuture<Collection> getCollection(GetCollectionRequest request)

Gets a collection.

Parameter
Name Description
request GetCollectionRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Collection>

getCorpus(GetCorpusRequest request)

public ListenableFuture<Corpus> getCorpus(GetCorpusRequest request)

Gets corpus details inside a project.

Parameter
Name Description
request GetCorpusRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Corpus>

getDataSchema(GetDataSchemaRequest request)

public ListenableFuture<DataSchema> getDataSchema(GetDataSchemaRequest request)

Gets data schema inside corpus.

Parameter
Name Description
request GetDataSchemaRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<DataSchema>

getIndex(GetIndexRequest request)

public ListenableFuture<Index> getIndex(GetIndexRequest request)

Gets the details of a single Index under a Corpus.

Parameter
Name Description
request GetIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Index>

getIndexEndpoint(GetIndexEndpointRequest request)

public ListenableFuture<IndexEndpoint> getIndexEndpoint(GetIndexEndpointRequest request)

Gets an IndexEndpoint.

Parameter
Name Description
request GetIndexEndpointRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<IndexEndpoint>

getSearchConfig(GetSearchConfigRequest request)

public ListenableFuture<SearchConfig> getSearchConfig(GetSearchConfigRequest request)

Gets a search configuration inside a corpus.

Parameter
Name Description
request GetSearchConfigRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchConfig>

getSearchHypernym(GetSearchHypernymRequest request)

public ListenableFuture<SearchHypernym> getSearchHypernym(GetSearchHypernymRequest request)

Gets a SearchHypernym inside a corpus.

Parameter
Name Description
request GetSearchHypernymRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchHypernym>

importAssets(ImportAssetsRequest request)

public ListenableFuture<Operation> importAssets(ImportAssetsRequest request)

Imports 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.

Parameter
Name Description
request ImportAssetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

indexAsset(IndexAssetRequest request)

public ListenableFuture<Operation> indexAsset(IndexAssetRequest request)

Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

Parameter
Name Description
request IndexAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

listAnnotations(ListAnnotationsRequest request)

public ListenableFuture<ListAnnotationsResponse> listAnnotations(ListAnnotationsRequest request)

Lists a list of annotations inside asset.

Parameter
Name Description
request ListAnnotationsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListAnnotationsResponse>

listAssets(ListAssetsRequest request)

public ListenableFuture<ListAssetsResponse> listAssets(ListAssetsRequest request)

Lists an list of assets inside corpus.

Parameter
Name Description
request ListAssetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListAssetsResponse>

listCollections(ListCollectionsRequest request)

public ListenableFuture<ListCollectionsResponse> listCollections(ListCollectionsRequest request)

Lists collections inside a corpus.

Parameter
Name Description
request ListCollectionsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListCollectionsResponse>

listCorpora(ListCorporaRequest request)

public ListenableFuture<ListCorporaResponse> listCorpora(ListCorporaRequest request)

Lists all corpora in a project.

Parameter
Name Description
request ListCorporaRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListCorporaResponse>

listDataSchemas(ListDataSchemasRequest request)

public ListenableFuture<ListDataSchemasResponse> listDataSchemas(ListDataSchemasRequest request)

Lists a list of data schemas inside corpus.

Parameter
Name Description
request ListDataSchemasRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListDataSchemasResponse>

listIndexEndpoints(ListIndexEndpointsRequest request)

public ListenableFuture<ListIndexEndpointsResponse> listIndexEndpoints(ListIndexEndpointsRequest request)

Lists all IndexEndpoints in a project.

Parameter
Name Description
request ListIndexEndpointsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListIndexEndpointsResponse>

listIndexes(ListIndexesRequest request)

public ListenableFuture<ListIndexesResponse> listIndexes(ListIndexesRequest request)

List all Indexes in a given Corpus.

Parameter
Name Description
request ListIndexesRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListIndexesResponse>

listSearchConfigs(ListSearchConfigsRequest request)

public ListenableFuture<ListSearchConfigsResponse> listSearchConfigs(ListSearchConfigsRequest request)

Lists all search configurations inside a corpus.

Parameter
Name Description
request ListSearchConfigsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListSearchConfigsResponse>

listSearchHypernyms(ListSearchHypernymsRequest request)

public ListenableFuture<ListSearchHypernymsResponse> listSearchHypernyms(ListSearchHypernymsRequest request)

Lists SearchHypernyms inside a corpus.

Parameter
Name Description
request ListSearchHypernymsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ListSearchHypernymsResponse>

removeCollectionItem(RemoveCollectionItemRequest request)

public ListenableFuture<RemoveCollectionItemResponse> removeCollectionItem(RemoveCollectionItemRequest request)

Removes an item from a collection.

Parameter
Name Description
request RemoveCollectionItemRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<RemoveCollectionItemResponse>

removeIndexAsset(RemoveIndexAssetRequest request)

public ListenableFuture<Operation> removeIndexAsset(RemoveIndexAssetRequest request)

Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

Parameter
Name Description
request RemoveIndexAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

searchAssets(SearchAssetsRequest request)

public ListenableFuture<SearchAssetsResponse> searchAssets(SearchAssetsRequest request)

Search media asset.

Parameter
Name Description
request SearchAssetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchAssetsResponse>

searchIndexEndpoint(SearchIndexEndpointRequest request)

public ListenableFuture<SearchIndexEndpointResponse> searchIndexEndpoint(SearchIndexEndpointRequest request)

Search a deployed index endpoint (IMAGE corpus type only).

Parameter
Name Description
request SearchIndexEndpointRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchIndexEndpointResponse>

undeployIndex(UndeployIndexRequest request)

public ListenableFuture<Operation> undeployIndex(UndeployIndexRequest request)

Undeploys an Index from IndexEndpoint.

Parameter
Name Description
request UndeployIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateAnnotation(UpdateAnnotationRequest request)

public ListenableFuture<Annotation> updateAnnotation(UpdateAnnotationRequest request)

Updates annotation inside asset.

Parameter
Name Description
request UpdateAnnotationRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Annotation>

updateAsset(UpdateAssetRequest request)

public ListenableFuture<Asset> updateAsset(UpdateAssetRequest request)

Updates an asset inside corpus.

Parameter
Name Description
request UpdateAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Asset>

updateCollection(UpdateCollectionRequest request)

public ListenableFuture<Collection> updateCollection(UpdateCollectionRequest request)

Updates a collection.

Parameter
Name Description
request UpdateCollectionRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Collection>

updateCorpus(UpdateCorpusRequest request)

public ListenableFuture<Corpus> updateCorpus(UpdateCorpusRequest request)

Updates a corpus in a project.

Parameter
Name Description
request UpdateCorpusRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Corpus>

updateDataSchema(UpdateDataSchemaRequest request)

public ListenableFuture<DataSchema> updateDataSchema(UpdateDataSchemaRequest request)

Updates data schema inside corpus.

Parameter
Name Description
request UpdateDataSchemaRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<DataSchema>

updateIndex(UpdateIndexRequest request)

public ListenableFuture<Operation> updateIndex(UpdateIndexRequest request)

Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.

Parameter
Name Description
request UpdateIndexRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateIndexEndpoint(UpdateIndexEndpointRequest request)

public ListenableFuture<Operation> updateIndexEndpoint(UpdateIndexEndpointRequest request)

Updates an IndexEndpoint.

Parameter
Name Description
request UpdateIndexEndpointRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

updateSearchConfig(UpdateSearchConfigRequest request)

public ListenableFuture<SearchConfig> updateSearchConfig(UpdateSearchConfigRequest request)

Updates a search configuration inside a corpus. Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules ---

  1. Request.search_configuration.name must already exist.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameter
Name Description
request UpdateSearchConfigRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchConfig>

updateSearchHypernym(UpdateSearchHypernymRequest request)

public ListenableFuture<SearchHypernym> updateSearchHypernym(UpdateSearchHypernymRequest request)

Updates a SearchHypernym inside a corpus.

Parameter
Name Description
request UpdateSearchHypernymRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<SearchHypernym>

uploadAsset(UploadAssetRequest request)

public ListenableFuture<Operation> uploadAsset(UploadAssetRequest request)

Upload 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.

Parameter
Name Description
request UploadAssetRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<Operation>

viewCollectionItems(ViewCollectionItemsRequest request)

public ListenableFuture<ViewCollectionItemsResponse> viewCollectionItems(ViewCollectionItemsRequest request)

View items inside a collection.

Parameter
Name Description
request ViewCollectionItemsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ViewCollectionItemsResponse>

viewIndexedAssets(ViewIndexedAssetsRequest request)

public ListenableFuture<ViewIndexedAssetsResponse> viewIndexedAssets(ViewIndexedAssetsRequest request)

Lists assets inside an index.

Parameter
Name Description
request ViewIndexedAssetsRequest
Returns
Type Description
com.google.common.util.concurrent.ListenableFuture<ViewIndexedAssetsResponse>