Class WarehouseClient (0.10.0)

GitHub RepositoryProduct ReferenceRPC Documentation

Service Description: Service that manages media content + metadata for streaming.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   Asset asset = Asset.newBuilder().build();
   String assetId = "assetId-704776149";
   Asset response = warehouseClient.createAsset(parent, asset, assetId);
 }
 

Note: close() needs to be called on the WarehouseClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

CreateAsset

Creates an asset inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createAsset(CreateAssetRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createAsset(CorpusName parent, Asset asset, String assetId)

  • createAsset(String parent, Asset asset, String assetId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createAssetCallable()

UpdateAsset

Updates an asset inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateAsset(UpdateAssetRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateAsset(Asset asset, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateAssetCallable()

GetAsset

Reads an asset inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAsset(GetAssetRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAsset(AssetName name)

  • getAsset(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAssetCallable()

ListAssets

Lists an list of assets inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAssets(ListAssetsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAssets(CorpusName parent)

  • listAssets(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAssetsPagedCallable()

  • listAssetsCallable()

DeleteAsset

Deletes asset inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAssetAsync(DeleteAssetRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteAssetAsync(AssetName name)

  • deleteAssetAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteAssetOperationCallable()

  • deleteAssetCallable()

UploadAsset

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • uploadAssetAsync(UploadAssetRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • uploadAssetOperationCallable()

  • uploadAssetCallable()

GenerateRetrievalUrl

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateRetrievalUrl(GenerateRetrievalUrlRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateRetrievalUrlCallable()

AnalyzeAsset

Analyze asset to power search capability.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • analyzeAssetAsync(AnalyzeAssetRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • analyzeAssetOperationCallable()

  • analyzeAssetCallable()

IndexAsset

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • indexAssetAsync(IndexAssetRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • indexAssetOperationCallable()

  • indexAssetCallable()

RemoveIndexAsset

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • removeIndexAssetAsync(RemoveIndexAssetRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • removeIndexAssetOperationCallable()

  • removeIndexAssetCallable()

ViewIndexedAssets

Lists assets inside an index.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • viewIndexedAssets(ViewIndexedAssetsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • viewIndexedAssets(IndexName index)

  • viewIndexedAssets(String index)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • viewIndexedAssetsPagedCallable()

  • viewIndexedAssetsCallable()

CreateIndex

Creates an Index under the corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIndexAsync(CreateIndexRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createIndexAsync(CorpusName parent, Index index, String indexId)

  • createIndexAsync(String parent, Index index, String indexId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIndexOperationCallable()

  • createIndexCallable()

UpdateIndex

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateIndexAsync(UpdateIndexRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateIndexAsync(Index index, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateIndexOperationCallable()

  • updateIndexCallable()

GetIndex

Gets the details of a single Index under a Corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIndex(GetIndexRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIndex(IndexName name)

  • getIndex(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIndexCallable()

ListIndexes

List all Indexes in a given Corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIndexes(ListIndexesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listIndexes(CorpusName parent)

  • listIndexes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIndexesPagedCallable()

  • listIndexesCallable()

DeleteIndex

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteIndexAsync(DeleteIndexRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteIndexAsync(IndexName name)

  • deleteIndexAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteIndexOperationCallable()

  • deleteIndexCallable()

CreateCorpus

Creates a corpus inside a project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCorpusAsync(CreateCorpusRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createCorpusAsync(String parent, Corpus corpus)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCorpusOperationCallable()

  • createCorpusCallable()

GetCorpus

Gets corpus details inside a project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCorpus(GetCorpusRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCorpus(CorpusName name)

  • getCorpus(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCorpusCallable()

UpdateCorpus

Updates a corpus in a project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCorpus(UpdateCorpusRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateCorpus(Corpus corpus, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCorpusCallable()

ListCorpora

Lists all corpora in a project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCorpora(ListCorporaRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCorpora(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCorporaPagedCallable()

  • listCorporaCallable()

DeleteCorpus

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteCorpus(DeleteCorpusRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteCorpus(CorpusName name)

  • deleteCorpus(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteCorpusCallable()

AnalyzeCorpus

Analyzes a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • analyzeCorpusAsync(AnalyzeCorpusRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • analyzeCorpusOperationCallable()

  • analyzeCorpusCallable()

CreateDataSchema

Creates data schema inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createDataSchema(CreateDataSchemaRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createDataSchema(CorpusName parent, DataSchema dataSchema)

  • createDataSchema(String parent, DataSchema dataSchema)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createDataSchemaCallable()

UpdateDataSchema

Updates data schema inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateDataSchema(UpdateDataSchemaRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateDataSchema(DataSchema dataSchema, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateDataSchemaCallable()

GetDataSchema

Gets data schema inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getDataSchema(GetDataSchemaRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getDataSchema(DataSchemaName name)

  • getDataSchema(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getDataSchemaCallable()

DeleteDataSchema

Deletes data schema inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteDataSchema(DeleteDataSchemaRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteDataSchema(DataSchemaName name)

  • deleteDataSchema(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteDataSchemaCallable()

ListDataSchemas

Lists a list of data schemas inside corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDataSchemas(ListDataSchemasRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDataSchemas(CorpusName parent)

  • listDataSchemas(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDataSchemasPagedCallable()

  • listDataSchemasCallable()

CreateAnnotation

Creates annotation inside asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createAnnotation(CreateAnnotationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createAnnotation(AssetName parent, Annotation annotation, String annotationId)

  • createAnnotation(String parent, Annotation annotation, String annotationId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createAnnotationCallable()

GetAnnotation

Reads annotation inside asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAnnotation(GetAnnotationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAnnotation(AnnotationName name)

  • getAnnotation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAnnotationCallable()

ListAnnotations

Lists a list of annotations inside asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAnnotations(ListAnnotationsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAnnotations(AssetName parent)

  • listAnnotations(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAnnotationsPagedCallable()

  • listAnnotationsCallable()

UpdateAnnotation

Updates annotation inside asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateAnnotation(UpdateAnnotationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateAnnotation(Annotation annotation, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateAnnotationCallable()

DeleteAnnotation

Deletes annotation inside asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAnnotation(DeleteAnnotationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteAnnotation(AnnotationName name)

  • deleteAnnotation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteAnnotationCallable()

IngestAsset

Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • ingestAssetCallable()

ClipAsset

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • clipAsset(ClipAssetRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • clipAssetCallable()

GenerateHlsUri

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateHlsUri(GenerateHlsUriRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateHlsUriCallable()

ImportAssets

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • importAssetsAsync(ImportAssetsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • importAssetsOperationCallable()

  • importAssetsCallable()

CreateSearchConfig

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSearchConfig(CreateSearchConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createSearchConfig(CorpusName parent, SearchConfig searchConfig, String searchConfigId)

  • createSearchConfig(String parent, SearchConfig searchConfig, String searchConfigId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSearchConfigCallable()

UpdateSearchConfig

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSearchConfig(UpdateSearchConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSearchConfigCallable()

GetSearchConfig

Gets a search configuration inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSearchConfig(GetSearchConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSearchConfig(SearchConfigName name)

  • getSearchConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSearchConfigCallable()

DeleteSearchConfig

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSearchConfig(DeleteSearchConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteSearchConfig(SearchConfigName name)

  • deleteSearchConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSearchConfigCallable()

ListSearchConfigs

Lists all search configurations inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSearchConfigs(ListSearchConfigsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSearchConfigs(CorpusName parent)

  • listSearchConfigs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSearchConfigsPagedCallable()

  • listSearchConfigsCallable()

CreateSearchHypernym

Creates a SearchHypernym inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSearchHypernym(CreateSearchHypernymRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createSearchHypernym(CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId)

  • createSearchHypernym(String parent, SearchHypernym searchHypernym, String searchHypernymId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSearchHypernymCallable()

UpdateSearchHypernym

Updates a SearchHypernym inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSearchHypernym(UpdateSearchHypernymRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateSearchHypernym(SearchHypernym searchHypernym, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSearchHypernymCallable()

GetSearchHypernym

Gets a SearchHypernym inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSearchHypernym(GetSearchHypernymRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSearchHypernym(SearchHypernymName name)

  • getSearchHypernym(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSearchHypernymCallable()

DeleteSearchHypernym

Deletes a SearchHypernym inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSearchHypernym(DeleteSearchHypernymRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteSearchHypernym(SearchHypernymName name)

  • deleteSearchHypernym(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSearchHypernymCallable()

ListSearchHypernyms

Lists SearchHypernyms inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSearchHypernyms(ListSearchHypernymsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSearchHypernyms(CorpusName parent)

  • listSearchHypernyms(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSearchHypernymsPagedCallable()

  • listSearchHypernymsCallable()

SearchAssets

Search media asset.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • searchAssets(SearchAssetsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • searchAssetsPagedCallable()

  • searchAssetsCallable()

SearchIndexEndpoint

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • searchIndexEndpoint(SearchIndexEndpointRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • searchIndexEndpointPagedCallable()

  • searchIndexEndpointCallable()

CreateIndexEndpoint

Creates an IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createIndexEndpointAsync(CreateIndexEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId)

  • createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint, String indexEndpointId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createIndexEndpointOperationCallable()

  • createIndexEndpointCallable()

GetIndexEndpoint

Gets an IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIndexEndpoint(GetIndexEndpointRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIndexEndpoint(IndexEndpointName name)

  • getIndexEndpoint(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIndexEndpointCallable()

ListIndexEndpoints

Lists all IndexEndpoints in a project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listIndexEndpoints(ListIndexEndpointsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listIndexEndpoints(LocationName parent)

  • listIndexEndpoints(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listIndexEndpointsPagedCallable()

  • listIndexEndpointsCallable()

UpdateIndexEndpoint

Updates an IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateIndexEndpointAsync(UpdateIndexEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateIndexEndpointAsync(IndexEndpoint indexEndpoint, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateIndexEndpointOperationCallable()

  • updateIndexEndpointCallable()

DeleteIndexEndpoint

Deletes an IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteIndexEndpointAsync(DeleteIndexEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteIndexEndpointAsync(IndexEndpointName name)

  • deleteIndexEndpointAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteIndexEndpointOperationCallable()

  • deleteIndexEndpointCallable()

DeployIndex

Deploys an Index to IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deployIndexAsync(DeployIndexRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deployIndexOperationCallable()

  • deployIndexCallable()

UndeployIndex

Undeploys an Index from IndexEndpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • undeployIndexAsync(UndeployIndexRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • undeployIndexOperationCallable()

  • undeployIndexCallable()

CreateCollection

Creates a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCollectionAsync(CreateCollectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createCollectionAsync(CorpusName parent, Collection collection, String collectionId)

  • createCollectionAsync(String parent, Collection collection, String collectionId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCollectionOperationCallable()

  • createCollectionCallable()

DeleteCollection

Deletes a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteCollectionAsync(DeleteCollectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteCollectionAsync(CollectionName name)

  • deleteCollectionAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteCollectionOperationCallable()

  • deleteCollectionCallable()

GetCollection

Gets a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCollection(GetCollectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCollection(CollectionName name)

  • getCollection(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCollectionCallable()

UpdateCollection

Updates a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCollection(UpdateCollectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateCollection(Collection collection, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCollectionCallable()

ListCollections

Lists collections inside a corpus.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCollections(ListCollectionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCollections(CorpusName parent)

  • listCollections(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCollectionsPagedCallable()

  • listCollectionsCallable()

AddCollectionItem

Adds an item into a Collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • addCollectionItem(AddCollectionItemRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • addCollectionItem(CollectionItem item)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • addCollectionItemCallable()

RemoveCollectionItem

Removes an item from a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • removeCollectionItem(RemoveCollectionItemRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • removeCollectionItem(CollectionItem item)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • removeCollectionItemCallable()

ViewCollectionItems

View items inside a collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • viewCollectionItems(ViewCollectionItemsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • viewCollectionItems(CollectionName collection)

  • viewCollectionItems(String collection)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • viewCollectionItemsPagedCallable()

  • viewCollectionItemsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of WarehouseSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WarehouseSettings warehouseSettings =
     WarehouseSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WarehouseSettings warehouseSettings =
     WarehouseSettings.newBuilder().setEndpoint(myEndpoint).build();
 WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 WarehouseSettings warehouseSettings = WarehouseSettings.newHttpJsonBuilder().build();
 WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > WarehouseClient

Static Methods

create()

public static final WarehouseClient create()

Constructs an instance of WarehouseClient with default settings.

Returns
Type Description
WarehouseClient
Exceptions
Type Description
IOException

create(WarehouseSettings settings)

public static final WarehouseClient create(WarehouseSettings settings)

Constructs an instance of WarehouseClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings WarehouseSettings
Returns
Type Description
WarehouseClient
Exceptions
Type Description
IOException

create(WarehouseStub stub)

public static final WarehouseClient create(WarehouseStub stub)

Constructs an instance of WarehouseClient, using the given stub for making calls. This is for advanced usage - prefer using create(WarehouseSettings).

Parameter
Name Description
stub WarehouseStub
Returns
Type Description
WarehouseClient

Constructors

WarehouseClient(WarehouseSettings settings)

protected WarehouseClient(WarehouseSettings settings)

Constructs an instance of WarehouseClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings WarehouseSettings

WarehouseClient(WarehouseStub stub)

protected WarehouseClient(WarehouseStub stub)
Parameter
Name Description
stub WarehouseStub

Methods

addCollectionItem(AddCollectionItemRequest request)

public final AddCollectionItemResponse addCollectionItem(AddCollectionItemRequest request)

Adds an item into a Collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AddCollectionItemRequest request =
       AddCollectionItemRequest.newBuilder()
           .setItem(CollectionItem.newBuilder().build())
           .build();
   AddCollectionItemResponse response = warehouseClient.addCollectionItem(request);
 }
 
Parameter
Name Description
request AddCollectionItemRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
AddCollectionItemResponse

addCollectionItem(CollectionItem item)

public final AddCollectionItemResponse addCollectionItem(CollectionItem item)

Adds an item into a Collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CollectionItem item = CollectionItem.newBuilder().build();
   AddCollectionItemResponse response = warehouseClient.addCollectionItem(item);
 }
 
Parameter
Name Description
item CollectionItem

Required. The item to be added.

Returns
Type Description
AddCollectionItemResponse

addCollectionItemCallable()

public final UnaryCallable<AddCollectionItemRequest,AddCollectionItemResponse> addCollectionItemCallable()

Adds an item into a Collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AddCollectionItemRequest request =
       AddCollectionItemRequest.newBuilder()
           .setItem(CollectionItem.newBuilder().build())
           .build();
   ApiFuture<AddCollectionItemResponse> future =
       warehouseClient.addCollectionItemCallable().futureCall(request);
   // Do something.
   AddCollectionItemResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<AddCollectionItemRequest,AddCollectionItemResponse>

analyzeAssetAsync(AnalyzeAssetRequest request)

public final OperationFuture<AnalyzeAssetResponse,AnalyzeAssetMetadata> analyzeAssetAsync(AnalyzeAssetRequest request)

Analyze asset to power search capability.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeAssetRequest request =
       AnalyzeAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   AnalyzeAssetResponse response = warehouseClient.analyzeAssetAsync(request).get();
 }
 
Parameter
Name Description
request AnalyzeAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<AnalyzeAssetResponse,AnalyzeAssetMetadata>

analyzeAssetCallable()

public final UnaryCallable<AnalyzeAssetRequest,Operation> analyzeAssetCallable()

Analyze asset to power search capability.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeAssetRequest request =
       AnalyzeAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.analyzeAssetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<AnalyzeAssetRequest,Operation>

analyzeAssetOperationCallable()

public final OperationCallable<AnalyzeAssetRequest,AnalyzeAssetResponse,AnalyzeAssetMetadata> analyzeAssetOperationCallable()

Analyze asset to power search capability.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeAssetRequest request =
       AnalyzeAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   OperationFuture<AnalyzeAssetResponse, AnalyzeAssetMetadata> future =
       warehouseClient.analyzeAssetOperationCallable().futureCall(request);
   // Do something.
   AnalyzeAssetResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<AnalyzeAssetRequest,AnalyzeAssetResponse,AnalyzeAssetMetadata>

analyzeCorpusAsync(AnalyzeCorpusRequest request)

public final OperationFuture<AnalyzeCorpusResponse,AnalyzeCorpusMetadata> analyzeCorpusAsync(AnalyzeCorpusRequest request)

Analyzes a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeCorpusRequest request =
       AnalyzeCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   AnalyzeCorpusResponse response = warehouseClient.analyzeCorpusAsync(request).get();
 }
 
Parameter
Name Description
request AnalyzeCorpusRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<AnalyzeCorpusResponse,AnalyzeCorpusMetadata>

analyzeCorpusCallable()

public final UnaryCallable<AnalyzeCorpusRequest,Operation> analyzeCorpusCallable()

Analyzes a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeCorpusRequest request =
       AnalyzeCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.analyzeCorpusCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<AnalyzeCorpusRequest,Operation>

analyzeCorpusOperationCallable()

public final OperationCallable<AnalyzeCorpusRequest,AnalyzeCorpusResponse,AnalyzeCorpusMetadata> analyzeCorpusOperationCallable()

Analyzes a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnalyzeCorpusRequest request =
       AnalyzeCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   OperationFuture<AnalyzeCorpusResponse, AnalyzeCorpusMetadata> future =
       warehouseClient.analyzeCorpusOperationCallable().futureCall(request);
   // Do something.
   AnalyzeCorpusResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<AnalyzeCorpusRequest,AnalyzeCorpusResponse,AnalyzeCorpusMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

clipAsset(ClipAssetRequest request)

public final ClipAssetResponse clipAsset(ClipAssetRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ClipAssetRequest request =
       ClipAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setTemporalPartition(Partition.TemporalPartition.newBuilder().build())
           .build();
   ClipAssetResponse response = warehouseClient.clipAsset(request);
 }
 
Parameter
Name Description
request ClipAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ClipAssetResponse

clipAssetCallable()

public final UnaryCallable<ClipAssetRequest,ClipAssetResponse> clipAssetCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ClipAssetRequest request =
       ClipAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setTemporalPartition(Partition.TemporalPartition.newBuilder().build())
           .build();
   ApiFuture<ClipAssetResponse> future = warehouseClient.clipAssetCallable().futureCall(request);
   // Do something.
   ClipAssetResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ClipAssetRequest,ClipAssetResponse>

close()

public final void close()

createAnnotation(AssetName parent, Annotation annotation, String annotationId)

public final Annotation createAnnotation(AssetName parent, Annotation annotation, String annotationId)

Creates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
   Annotation annotation = Annotation.newBuilder().build();
   String annotationId = "annotationId251782314";
   Annotation response = warehouseClient.createAnnotation(parent, annotation, annotationId);
 }
 
Parameters
Name Description
parent AssetName

Required. The parent resource where this annotation will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

annotation Annotation

Required. The annotation to create.

annotationId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
Annotation

createAnnotation(CreateAnnotationRequest request)

public final Annotation createAnnotation(CreateAnnotationRequest request)

Creates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateAnnotationRequest request =
       CreateAnnotationRequest.newBuilder()
           .setParent(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setAnnotation(Annotation.newBuilder().build())
           .setAnnotationId("annotationId251782314")
           .build();
   Annotation response = warehouseClient.createAnnotation(request);
 }
 
Parameter
Name Description
request CreateAnnotationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Annotation

createAnnotation(String parent, Annotation annotation, String annotationId)

public final Annotation createAnnotation(String parent, Annotation annotation, String annotationId)

Creates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent =
       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
   Annotation annotation = Annotation.newBuilder().build();
   String annotationId = "annotationId251782314";
   Annotation response = warehouseClient.createAnnotation(parent, annotation, annotationId);
 }
 
Parameters
Name Description
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 Annotation

Required. The annotation to create.

annotationId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
Annotation

createAnnotationCallable()

public final UnaryCallable<CreateAnnotationRequest,Annotation> createAnnotationCallable()

Creates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateAnnotationRequest request =
       CreateAnnotationRequest.newBuilder()
           .setParent(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setAnnotation(Annotation.newBuilder().build())
           .setAnnotationId("annotationId251782314")
           .build();
   ApiFuture<Annotation> future = warehouseClient.createAnnotationCallable().futureCall(request);
   // Do something.
   Annotation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateAnnotationRequest,Annotation>

createAsset(CorpusName parent, Asset asset, String assetId)

public final Asset createAsset(CorpusName parent, Asset asset, String assetId)

Creates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   Asset asset = Asset.newBuilder().build();
   String assetId = "assetId-704776149";
   Asset response = warehouseClient.createAsset(parent, asset, assetId);
 }
 
Parameters
Name Description
parent CorpusName

Required. The parent resource where this asset will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

asset Asset

Required. The asset to create.

assetId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
Asset

createAsset(CreateAssetRequest request)

public final Asset createAsset(CreateAssetRequest request)

Creates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateAssetRequest request =
       CreateAssetRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setAsset(Asset.newBuilder().build())
           .setAssetId("assetId-704776149")
           .build();
   Asset response = warehouseClient.createAsset(request);
 }
 
Parameter
Name Description
request CreateAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Asset

createAsset(String parent, Asset asset, String assetId)

public final Asset createAsset(String parent, Asset asset, String assetId)

Creates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   Asset asset = Asset.newBuilder().build();
   String assetId = "assetId-704776149";
   Asset response = warehouseClient.createAsset(parent, asset, assetId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this asset will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

asset Asset

Required. The asset to create.

assetId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
Asset

createAssetCallable()

public final UnaryCallable<CreateAssetRequest,Asset> createAssetCallable()

Creates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateAssetRequest request =
       CreateAssetRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setAsset(Asset.newBuilder().build())
           .setAssetId("assetId-704776149")
           .build();
   ApiFuture<Asset> future = warehouseClient.createAssetCallable().futureCall(request);
   // Do something.
   Asset response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateAssetRequest,Asset>

createCollectionAsync(CorpusName parent, Collection collection, String collectionId)

public final OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(CorpusName parent, Collection collection, String collectionId)

Creates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   Collection collection = Collection.newBuilder().build();
   String collectionId = "collectionId1636075609";
   Collection response =
       warehouseClient.createCollectionAsync(parent, collection, collectionId).get();
 }
 
Parameters
Name Description
parent CorpusName

Required. The parent resource where this collection will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

collection Collection

Required. The collection resource to be created.

collectionId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
OperationFuture<Collection,CreateCollectionMetadata>

createCollectionAsync(CreateCollectionRequest request)

public final OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(CreateCollectionRequest request)

Creates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCollectionRequest request =
       CreateCollectionRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setCollection(Collection.newBuilder().build())
           .setCollectionId("collectionId1636075609")
           .build();
   Collection response = warehouseClient.createCollectionAsync(request).get();
 }
 
Parameter
Name Description
request CreateCollectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collection,CreateCollectionMetadata>

createCollectionAsync(String parent, Collection collection, String collectionId)

public final OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(String parent, Collection collection, String collectionId)

Creates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   Collection collection = Collection.newBuilder().build();
   String collectionId = "collectionId1636075609";
   Collection response =
       warehouseClient.createCollectionAsync(parent, collection, collectionId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this collection will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

collection Collection

Required. The collection resource to be created.

collectionId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
OperationFuture<Collection,CreateCollectionMetadata>

createCollectionCallable()

public final UnaryCallable<CreateCollectionRequest,Operation> createCollectionCallable()

Creates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCollectionRequest request =
       CreateCollectionRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setCollection(Collection.newBuilder().build())
           .setCollectionId("collectionId1636075609")
           .build();
   ApiFuture<Operation> future = warehouseClient.createCollectionCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateCollectionRequest,Operation>

createCollectionOperationCallable()

public final OperationCallable<CreateCollectionRequest,Collection,CreateCollectionMetadata> createCollectionOperationCallable()

Creates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCollectionRequest request =
       CreateCollectionRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setCollection(Collection.newBuilder().build())
           .setCollectionId("collectionId1636075609")
           .build();
   OperationFuture<Collection, CreateCollectionMetadata> future =
       warehouseClient.createCollectionOperationCallable().futureCall(request);
   // Do something.
   Collection response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateCollectionRequest,Collection,CreateCollectionMetadata>

createCorpusAsync(CreateCorpusRequest request)

public final OperationFuture<Corpus,CreateCorpusMetadata> createCorpusAsync(CreateCorpusRequest request)

Creates a corpus inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCorpusRequest request =
       CreateCorpusRequest.newBuilder()
           .setParent("parent-995424086")
           .setCorpus(Corpus.newBuilder().build())
           .build();
   Corpus response = warehouseClient.createCorpusAsync(request).get();
 }
 
Parameter
Name Description
request CreateCorpusRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Corpus,CreateCorpusMetadata>

createCorpusAsync(String parent, Corpus corpus)

public final OperationFuture<Corpus,CreateCorpusMetadata> createCorpusAsync(String parent, Corpus corpus)

Creates a corpus inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = "parent-995424086";
   Corpus corpus = Corpus.newBuilder().build();
   Corpus response = warehouseClient.createCorpusAsync(parent, corpus).get();
 }
 
Parameters
Name Description
parent String

Required. Form: projects/{project_number}/locations/{location_id}

corpus Corpus

Required. The corpus to be created.

Returns
Type Description
OperationFuture<Corpus,CreateCorpusMetadata>

createCorpusCallable()

public final UnaryCallable<CreateCorpusRequest,Operation> createCorpusCallable()

Creates a corpus inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCorpusRequest request =
       CreateCorpusRequest.newBuilder()
           .setParent("parent-995424086")
           .setCorpus(Corpus.newBuilder().build())
           .build();
   ApiFuture<Operation> future = warehouseClient.createCorpusCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateCorpusRequest,Operation>

createCorpusOperationCallable()

public final OperationCallable<CreateCorpusRequest,Corpus,CreateCorpusMetadata> createCorpusOperationCallable()

Creates a corpus inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateCorpusRequest request =
       CreateCorpusRequest.newBuilder()
           .setParent("parent-995424086")
           .setCorpus(Corpus.newBuilder().build())
           .build();
   OperationFuture<Corpus, CreateCorpusMetadata> future =
       warehouseClient.createCorpusOperationCallable().futureCall(request);
   // Do something.
   Corpus response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateCorpusRequest,Corpus,CreateCorpusMetadata>

createDataSchema(CorpusName parent, DataSchema dataSchema)

public final DataSchema createDataSchema(CorpusName parent, DataSchema dataSchema)

Creates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   DataSchema dataSchema = DataSchema.newBuilder().build();
   DataSchema response = warehouseClient.createDataSchema(parent, dataSchema);
 }
 
Parameters
Name Description
parent CorpusName

Required. The parent resource where this data schema will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

dataSchema DataSchema

Required. The data schema to create.

Returns
Type Description
DataSchema

createDataSchema(CreateDataSchemaRequest request)

public final DataSchema createDataSchema(CreateDataSchemaRequest request)

Creates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateDataSchemaRequest request =
       CreateDataSchemaRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setDataSchema(DataSchema.newBuilder().build())
           .build();
   DataSchema response = warehouseClient.createDataSchema(request);
 }
 
Parameter
Name Description
request CreateDataSchemaRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DataSchema

createDataSchema(String parent, DataSchema dataSchema)

public final DataSchema createDataSchema(String parent, DataSchema dataSchema)

Creates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   DataSchema dataSchema = DataSchema.newBuilder().build();
   DataSchema response = warehouseClient.createDataSchema(parent, dataSchema);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this data schema will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

dataSchema DataSchema

Required. The data schema to create.

Returns
Type Description
DataSchema

createDataSchemaCallable()

public final UnaryCallable<CreateDataSchemaRequest,DataSchema> createDataSchemaCallable()

Creates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateDataSchemaRequest request =
       CreateDataSchemaRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setDataSchema(DataSchema.newBuilder().build())
           .build();
   ApiFuture<DataSchema> future = warehouseClient.createDataSchemaCallable().futureCall(request);
   // Do something.
   DataSchema response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateDataSchemaRequest,DataSchema>

createIndexAsync(CorpusName parent, Index index, String indexId)

public final OperationFuture<Index,CreateIndexMetadata> createIndexAsync(CorpusName parent, Index index, String indexId)

Creates an Index under the corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   Index index = Index.newBuilder().build();
   String indexId = "indexId1943291277";
   Index response = warehouseClient.createIndexAsync(parent, index, indexId).get();
 }
 
Parameters
Name Description
parent CorpusName

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 Index

Required. The index being created.

indexId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
OperationFuture<Index,CreateIndexMetadata>

createIndexAsync(CreateIndexRequest request)

public final OperationFuture<Index,CreateIndexMetadata> createIndexAsync(CreateIndexRequest request)

Creates an Index under the corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexRequest request =
       CreateIndexRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setIndexId("indexId1943291277")
           .setIndex(Index.newBuilder().build())
           .build();
   Index response = warehouseClient.createIndexAsync(request).get();
 }
 
Parameter
Name Description
request CreateIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Index,CreateIndexMetadata>

createIndexAsync(String parent, Index index, String indexId)

public final OperationFuture<Index,CreateIndexMetadata> createIndexAsync(String parent, Index index, String indexId)

Creates an Index under the corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   Index index = Index.newBuilder().build();
   String indexId = "indexId1943291277";
   Index response = warehouseClient.createIndexAsync(parent, index, indexId).get();
 }
 
Parameters
Name Description
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 Index

Required. The index being created.

indexId 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-/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
OperationFuture<Index,CreateIndexMetadata>

createIndexCallable()

public final UnaryCallable<CreateIndexRequest,Operation> createIndexCallable()

Creates an Index under the corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexRequest request =
       CreateIndexRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setIndexId("indexId1943291277")
           .setIndex(Index.newBuilder().build())
           .build();
   ApiFuture<Operation> future = warehouseClient.createIndexCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateIndexRequest,Operation>

createIndexEndpointAsync(CreateIndexEndpointRequest request)

public final OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(CreateIndexEndpointRequest request)

Creates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexEndpointRequest request =
       CreateIndexEndpointRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setIndexEndpointId("indexEndpointId-250889214")
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .build();
   IndexEndpoint response = warehouseClient.createIndexEndpointAsync(request).get();
 }
 
Parameter
Name Description
request CreateIndexEndpointRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata>

createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId)

public final OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId)

Creates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
   String indexEndpointId = "indexEndpointId-250889214";
   IndexEndpoint response =
       warehouseClient.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. Format: projects/{project}/locations/{location}

indexEndpoint IndexEndpoint

Required. The resource being created.

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

Returns
Type Description
OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata>

createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint, String indexEndpointId)

public final OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint, String indexEndpointId)

Creates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
   String indexEndpointId = "indexEndpointId-250889214";
   IndexEndpoint response =
       warehouseClient.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get();
 }
 
Parameters
Name Description
parent String

Required. Format: projects/{project}/locations/{location}

indexEndpoint IndexEndpoint

Required. The resource being created.

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

Returns
Type Description
OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata>

createIndexEndpointCallable()

public final UnaryCallable<CreateIndexEndpointRequest,Operation> createIndexEndpointCallable()

Creates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexEndpointRequest request =
       CreateIndexEndpointRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setIndexEndpointId("indexEndpointId-250889214")
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       warehouseClient.createIndexEndpointCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateIndexEndpointRequest,Operation>

createIndexEndpointOperationCallable()

public final OperationCallable<CreateIndexEndpointRequest,IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointOperationCallable()

Creates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexEndpointRequest request =
       CreateIndexEndpointRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setIndexEndpointId("indexEndpointId-250889214")
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .build();
   OperationFuture<IndexEndpoint, CreateIndexEndpointMetadata> future =
       warehouseClient.createIndexEndpointOperationCallable().futureCall(request);
   // Do something.
   IndexEndpoint response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateIndexEndpointRequest,IndexEndpoint,CreateIndexEndpointMetadata>

createIndexOperationCallable()

public final OperationCallable<CreateIndexRequest,Index,CreateIndexMetadata> createIndexOperationCallable()

Creates an Index under the corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateIndexRequest request =
       CreateIndexRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setIndexId("indexId1943291277")
           .setIndex(Index.newBuilder().build())
           .build();
   OperationFuture<Index, CreateIndexMetadata> future =
       warehouseClient.createIndexOperationCallable().futureCall(request);
   // Do something.
   Index response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateIndexRequest,Index,CreateIndexMetadata>

createSearchConfig(CorpusName parent, SearchConfig searchConfig, String searchConfigId)

public final SearchConfig createSearchConfig(CorpusName parent, SearchConfig searchConfig, String searchConfigId)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   SearchConfig searchConfig = SearchConfig.newBuilder().build();
   String searchConfigId = "searchConfigId1576297925";
   SearchConfig response =
       warehouseClient.createSearchConfig(parent, searchConfig, searchConfigId);
 }
 
Parameters
Name Description
parent CorpusName

Required. The parent resource where this search configuration will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

searchConfig SearchConfig

Required. The search config to create.

searchConfigId 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-_/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
SearchConfig

createSearchConfig(CreateSearchConfigRequest request)

public final 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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateSearchConfigRequest request =
       CreateSearchConfigRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setSearchConfig(SearchConfig.newBuilder().build())
           .setSearchConfigId("searchConfigId1576297925")
           .build();
   SearchConfig response = warehouseClient.createSearchConfig(request);
 }
 
Parameter
Name Description
request CreateSearchConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchConfig

createSearchConfig(String parent, SearchConfig searchConfig, String searchConfigId)

public final SearchConfig createSearchConfig(String parent, SearchConfig searchConfig, String searchConfigId)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   SearchConfig searchConfig = SearchConfig.newBuilder().build();
   String searchConfigId = "searchConfigId1576297925";
   SearchConfig response =
       warehouseClient.createSearchConfig(parent, searchConfig, searchConfigId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this search configuration will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

searchConfig SearchConfig

Required. The search config to create.

searchConfigId 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-_/. The first character must be a letter, the last could be a letter or a number.

Returns
Type Description
SearchConfig

createSearchConfigCallable()

public final UnaryCallable<CreateSearchConfigRequest,SearchConfig> createSearchConfigCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateSearchConfigRequest request =
       CreateSearchConfigRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setSearchConfig(SearchConfig.newBuilder().build())
           .setSearchConfigId("searchConfigId1576297925")
           .build();
   ApiFuture<SearchConfig> future =
       warehouseClient.createSearchConfigCallable().futureCall(request);
   // Do something.
   SearchConfig response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateSearchConfigRequest,SearchConfig>

createSearchHypernym(CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId)

public final SearchHypernym createSearchHypernym(CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId)

Creates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
   String searchHypernymId = "searchHypernymId-314707559";
   SearchHypernym response =
       warehouseClient.createSearchHypernym(parent, searchHypernym, searchHypernymId);
 }
 
Parameters
Name Description
parent CorpusName

Required. The parent resource where this SearchHypernym will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

searchHypernym SearchHypernym

Required. The SearchHypernym to create.

searchHypernymId String

Optional. The search hypernym id. If omitted, a random UUID will be generated.

Returns
Type Description
SearchHypernym

createSearchHypernym(CreateSearchHypernymRequest request)

public final SearchHypernym createSearchHypernym(CreateSearchHypernymRequest request)

Creates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateSearchHypernymRequest request =
       CreateSearchHypernymRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setSearchHypernym(SearchHypernym.newBuilder().build())
           .setSearchHypernymId("searchHypernymId-314707559")
           .build();
   SearchHypernym response = warehouseClient.createSearchHypernym(request);
 }
 
Parameter
Name Description
request CreateSearchHypernymRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchHypernym

createSearchHypernym(String parent, SearchHypernym searchHypernym, String searchHypernymId)

public final SearchHypernym createSearchHypernym(String parent, SearchHypernym searchHypernym, String searchHypernymId)

Creates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
   String searchHypernymId = "searchHypernymId-314707559";
   SearchHypernym response =
       warehouseClient.createSearchHypernym(parent, searchHypernym, searchHypernymId);
 }
 
Parameters
Name Description
parent String

Required. The parent resource where this SearchHypernym will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

searchHypernym SearchHypernym

Required. The SearchHypernym to create.

searchHypernymId String

Optional. The search hypernym id. If omitted, a random UUID will be generated.

Returns
Type Description
SearchHypernym

createSearchHypernymCallable()

public final UnaryCallable<CreateSearchHypernymRequest,SearchHypernym> createSearchHypernymCallable()

Creates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CreateSearchHypernymRequest request =
       CreateSearchHypernymRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setSearchHypernym(SearchHypernym.newBuilder().build())
           .setSearchHypernymId("searchHypernymId-314707559")
           .build();
   ApiFuture<SearchHypernym> future =
       warehouseClient.createSearchHypernymCallable().futureCall(request);
   // Do something.
   SearchHypernym response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateSearchHypernymRequest,SearchHypernym>

deleteAnnotation(AnnotationName name)

public final void deleteAnnotation(AnnotationName name)

Deletes annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnnotationName name =
       AnnotationName.of(
           "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]");
   warehouseClient.deleteAnnotation(name);
 }
 
Parameter
Name Description
name AnnotationName

Required. The name of the annotation to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

deleteAnnotation(DeleteAnnotationRequest request)

public final void deleteAnnotation(DeleteAnnotationRequest request)

Deletes annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteAnnotationRequest request =
       DeleteAnnotationRequest.newBuilder()
           .setName(
               AnnotationName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
                   .toString())
           .build();
   warehouseClient.deleteAnnotation(request);
 }
 
Parameter
Name Description
request DeleteAnnotationRequest

The request object containing all of the parameters for the API call.

deleteAnnotation(String name)

public final void deleteAnnotation(String name)

Deletes annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
           .toString();
   warehouseClient.deleteAnnotation(name);
 }
 
Parameter
Name Description
name String

Required. The name of the annotation to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

deleteAnnotationCallable()

public final UnaryCallable<DeleteAnnotationRequest,Empty> deleteAnnotationCallable()

Deletes annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteAnnotationRequest request =
       DeleteAnnotationRequest.newBuilder()
           .setName(
               AnnotationName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
                   .toString())
           .build();
   ApiFuture<Empty> future = warehouseClient.deleteAnnotationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteAnnotationRequest,Empty>

deleteAssetAsync(AssetName name)

public final OperationFuture<Empty,DeleteAssetMetadata> deleteAssetAsync(AssetName name)

Deletes asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
   warehouseClient.deleteAssetAsync(name).get();
 }
 
Parameter
Name Description
name AssetName

Required. The name of the asset to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
OperationFuture<Empty,DeleteAssetMetadata>

deleteAssetAsync(DeleteAssetRequest request)

public final OperationFuture<Empty,DeleteAssetMetadata> deleteAssetAsync(DeleteAssetRequest request)

Deletes asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteAssetRequest request =
       DeleteAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   warehouseClient.deleteAssetAsync(request).get();
 }
 
Parameter
Name Description
request DeleteAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,DeleteAssetMetadata>

deleteAssetAsync(String name)

public final OperationFuture<Empty,DeleteAssetMetadata> deleteAssetAsync(String name)

Deletes asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
   warehouseClient.deleteAssetAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the asset to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
OperationFuture<Empty,DeleteAssetMetadata>

deleteAssetCallable()

public final UnaryCallable<DeleteAssetRequest,Operation> deleteAssetCallable()

Deletes asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteAssetRequest request =
       DeleteAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.deleteAssetCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteAssetRequest,Operation>

deleteAssetOperationCallable()

public final OperationCallable<DeleteAssetRequest,Empty,DeleteAssetMetadata> deleteAssetOperationCallable()

Deletes asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteAssetRequest request =
       DeleteAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   OperationFuture<Empty, DeleteAssetMetadata> future =
       warehouseClient.deleteAssetOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteAssetRequest,Empty,DeleteAssetMetadata>

deleteCollectionAsync(CollectionName name)

public final OperationFuture<Empty,DeleteCollectionMetadata> deleteCollectionAsync(CollectionName name)

Deletes a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CollectionName name =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
   warehouseClient.deleteCollectionAsync(name).get();
 }
 
Parameter
Name Description
name CollectionName

Required. The name of the collection to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
OperationFuture<Empty,DeleteCollectionMetadata>

deleteCollectionAsync(DeleteCollectionRequest request)

public final OperationFuture<Empty,DeleteCollectionMetadata> deleteCollectionAsync(DeleteCollectionRequest request)

Deletes a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteCollectionRequest request =
       DeleteCollectionRequest.newBuilder()
           .setName(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .build();
   warehouseClient.deleteCollectionAsync(request).get();
 }
 
Parameter
Name Description
request DeleteCollectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,DeleteCollectionMetadata>

deleteCollectionAsync(String name)

public final OperationFuture<Empty,DeleteCollectionMetadata> deleteCollectionAsync(String name)

Deletes a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
           .toString();
   warehouseClient.deleteCollectionAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the collection to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
OperationFuture<Empty,DeleteCollectionMetadata>

deleteCollectionCallable()

public final UnaryCallable<DeleteCollectionRequest,Operation> deleteCollectionCallable()

Deletes a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteCollectionRequest request =
       DeleteCollectionRequest.newBuilder()
           .setName(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.deleteCollectionCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteCollectionRequest,Operation>

deleteCollectionOperationCallable()

public final OperationCallable<DeleteCollectionRequest,Empty,DeleteCollectionMetadata> deleteCollectionOperationCallable()

Deletes a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteCollectionRequest request =
       DeleteCollectionRequest.newBuilder()
           .setName(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .build();
   OperationFuture<Empty, DeleteCollectionMetadata> future =
       warehouseClient.deleteCollectionOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteCollectionRequest,Empty,DeleteCollectionMetadata>

deleteCorpus(CorpusName name)

public final void deleteCorpus(CorpusName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   warehouseClient.deleteCorpus(name);
 }
 
Parameter
Name Description
name CorpusName

Required. The resource name of the corpus to delete.

deleteCorpus(DeleteCorpusRequest request)

public final void deleteCorpus(DeleteCorpusRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteCorpusRequest request =
       DeleteCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   warehouseClient.deleteCorpus(request);
 }
 
Parameter
Name Description
request DeleteCorpusRequest

The request object containing all of the parameters for the API call.

deleteCorpus(String name)

public final void deleteCorpus(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   warehouseClient.deleteCorpus(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the corpus to delete.

deleteCorpusCallable()

public final UnaryCallable<DeleteCorpusRequest,Empty> deleteCorpusCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteCorpusRequest request =
       DeleteCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   ApiFuture<Empty> future = warehouseClient.deleteCorpusCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteCorpusRequest,Empty>

deleteDataSchema(DataSchemaName name)

public final void deleteDataSchema(DataSchemaName name)

Deletes data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DataSchemaName name =
       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]");
   warehouseClient.deleteDataSchema(name);
 }
 
Parameter
Name Description
name DataSchemaName

Required. The name of the data schema to delete. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}

deleteDataSchema(DeleteDataSchemaRequest request)

public final void deleteDataSchema(DeleteDataSchemaRequest request)

Deletes data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteDataSchemaRequest request =
       DeleteDataSchemaRequest.newBuilder()
           .setName(
               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
                   .toString())
           .build();
   warehouseClient.deleteDataSchema(request);
 }
 
Parameter
Name Description
request DeleteDataSchemaRequest

The request object containing all of the parameters for the API call.

deleteDataSchema(String name)

public final void deleteDataSchema(String name)

Deletes data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
           .toString();
   warehouseClient.deleteDataSchema(name);
 }
 
Parameter
Name Description
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}

deleteDataSchemaCallable()

public final UnaryCallable<DeleteDataSchemaRequest,Empty> deleteDataSchemaCallable()

Deletes data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteDataSchemaRequest request =
       DeleteDataSchemaRequest.newBuilder()
           .setName(
               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
                   .toString())
           .build();
   ApiFuture<Empty> future = warehouseClient.deleteDataSchemaCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteDataSchemaRequest,Empty>

deleteIndexAsync(DeleteIndexRequest request)

public final OperationFuture<Empty,DeleteIndexMetadata> deleteIndexAsync(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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexRequest request =
       DeleteIndexRequest.newBuilder()
           .setName(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   warehouseClient.deleteIndexAsync(request).get();
 }
 
Parameter
Name Description
request DeleteIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,DeleteIndexMetadata>

deleteIndexAsync(IndexName name)

public final OperationFuture<Empty,DeleteIndexMetadata> deleteIndexAsync(IndexName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
   warehouseClient.deleteIndexAsync(name).get();
 }
 
Parameter
Name Description
name IndexName

Required. The name of the index to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
OperationFuture<Empty,DeleteIndexMetadata>

deleteIndexAsync(String name)

public final OperationFuture<Empty,DeleteIndexMetadata> deleteIndexAsync(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
   warehouseClient.deleteIndexAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the index to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
OperationFuture<Empty,DeleteIndexMetadata>

deleteIndexCallable()

public final UnaryCallable<DeleteIndexRequest,Operation> deleteIndexCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexRequest request =
       DeleteIndexRequest.newBuilder()
           .setName(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.deleteIndexCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteIndexRequest,Operation>

deleteIndexEndpointAsync(DeleteIndexEndpointRequest request)

public final OperationFuture<Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(DeleteIndexEndpointRequest request)

Deletes an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexEndpointRequest request =
       DeleteIndexEndpointRequest.newBuilder()
           .setName(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   warehouseClient.deleteIndexEndpointAsync(request).get();
 }
 
Parameter
Name Description
request DeleteIndexEndpointRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,DeleteIndexEndpointMetadata>

deleteIndexEndpointAsync(IndexEndpointName name)

public final OperationFuture<Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(IndexEndpointName name)

Deletes an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
   warehouseClient.deleteIndexEndpointAsync(name).get();
 }
 
Parameter
Name Description
name IndexEndpointName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,DeleteIndexEndpointMetadata>

deleteIndexEndpointAsync(String name)

public final OperationFuture<Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(String name)

Deletes an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
   warehouseClient.deleteIndexEndpointAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,DeleteIndexEndpointMetadata>

deleteIndexEndpointCallable()

public final UnaryCallable<DeleteIndexEndpointRequest,Operation> deleteIndexEndpointCallable()

Deletes an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexEndpointRequest request =
       DeleteIndexEndpointRequest.newBuilder()
           .setName(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   ApiFuture<Operation> future =
       warehouseClient.deleteIndexEndpointCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteIndexEndpointRequest,Operation>

deleteIndexEndpointOperationCallable()

public final OperationCallable<DeleteIndexEndpointRequest,Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointOperationCallable()

Deletes an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexEndpointRequest request =
       DeleteIndexEndpointRequest.newBuilder()
           .setName(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   OperationFuture<Empty, DeleteIndexEndpointMetadata> future =
       warehouseClient.deleteIndexEndpointOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteIndexEndpointRequest,Empty,DeleteIndexEndpointMetadata>

deleteIndexOperationCallable()

public final OperationCallable<DeleteIndexRequest,Empty,DeleteIndexMetadata> deleteIndexOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteIndexRequest request =
       DeleteIndexRequest.newBuilder()
           .setName(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   OperationFuture<Empty, DeleteIndexMetadata> future =
       warehouseClient.deleteIndexOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteIndexRequest,Empty,DeleteIndexMetadata>

deleteSearchConfig(DeleteSearchConfigRequest request)

public final void deleteSearchConfig(DeleteSearchConfigRequest request)

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteSearchConfigRequest request =
       DeleteSearchConfigRequest.newBuilder()
           .setName(
               SearchConfigName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
                   .toString())
           .build();
   warehouseClient.deleteSearchConfig(request);
 }
 
Parameter
Name Description
request DeleteSearchConfigRequest

The request object containing all of the parameters for the API call.

deleteSearchConfig(SearchConfigName name)

public final void deleteSearchConfig(SearchConfigName name)

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchConfigName name =
       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]");
   warehouseClient.deleteSearchConfig(name);
 }
 
Parameter
Name Description
name SearchConfigName

Required. The name of the search configuration to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

deleteSearchConfig(String name)

public final void deleteSearchConfig(String name)

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
           .toString();
   warehouseClient.deleteSearchConfig(name);
 }
 
Parameter
Name Description
name String

Required. The name of the search configuration to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

deleteSearchConfigCallable()

public final UnaryCallable<DeleteSearchConfigRequest,Empty> deleteSearchConfigCallable()

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteSearchConfigRequest request =
       DeleteSearchConfigRequest.newBuilder()
           .setName(
               SearchConfigName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
                   .toString())
           .build();
   ApiFuture<Empty> future = warehouseClient.deleteSearchConfigCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteSearchConfigRequest,Empty>

deleteSearchHypernym(DeleteSearchHypernymRequest request)

public final void deleteSearchHypernym(DeleteSearchHypernymRequest request)

Deletes a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteSearchHypernymRequest request =
       DeleteSearchHypernymRequest.newBuilder()
           .setName(
               SearchHypernymName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
                   .toString())
           .build();
   warehouseClient.deleteSearchHypernym(request);
 }
 
Parameter
Name Description
request DeleteSearchHypernymRequest

The request object containing all of the parameters for the API call.

deleteSearchHypernym(SearchHypernymName name)

public final void deleteSearchHypernym(SearchHypernymName name)

Deletes a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchHypernymName name =
       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]");
   warehouseClient.deleteSearchHypernym(name);
 }
 
Parameter
Name Description
name SearchHypernymName

Required. The name of the SearchHypernym to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

deleteSearchHypernym(String name)

public final void deleteSearchHypernym(String name)

Deletes a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
           .toString();
   warehouseClient.deleteSearchHypernym(name);
 }
 
Parameter
Name Description
name String

Required. The name of the SearchHypernym to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

deleteSearchHypernymCallable()

public final UnaryCallable<DeleteSearchHypernymRequest,Empty> deleteSearchHypernymCallable()

Deletes a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeleteSearchHypernymRequest request =
       DeleteSearchHypernymRequest.newBuilder()
           .setName(
               SearchHypernymName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
                   .toString())
           .build();
   ApiFuture<Empty> future = warehouseClient.deleteSearchHypernymCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteSearchHypernymRequest,Empty>

deployIndexAsync(DeployIndexRequest request)

public final OperationFuture<DeployIndexResponse,DeployIndexMetadata> deployIndexAsync(DeployIndexRequest request)

Deploys an Index to IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeployIndexRequest request =
       DeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .setDeployedIndex(DeployedIndex.newBuilder().build())
           .build();
   DeployIndexResponse response = warehouseClient.deployIndexAsync(request).get();
 }
 
Parameter
Name Description
request DeployIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<DeployIndexResponse,DeployIndexMetadata>

deployIndexCallable()

public final UnaryCallable<DeployIndexRequest,Operation> deployIndexCallable()

Deploys an Index to IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeployIndexRequest request =
       DeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .setDeployedIndex(DeployedIndex.newBuilder().build())
           .build();
   ApiFuture<Operation> future = warehouseClient.deployIndexCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeployIndexRequest,Operation>

deployIndexOperationCallable()

public final OperationCallable<DeployIndexRequest,DeployIndexResponse,DeployIndexMetadata> deployIndexOperationCallable()

Deploys an Index to IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DeployIndexRequest request =
       DeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .setDeployedIndex(DeployedIndex.newBuilder().build())
           .build();
   OperationFuture<DeployIndexResponse, DeployIndexMetadata> future =
       warehouseClient.deployIndexOperationCallable().futureCall(request);
   // Do something.
   DeployIndexResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeployIndexRequest,DeployIndexResponse,DeployIndexMetadata>

generateHlsUri(GenerateHlsUriRequest request)

public final 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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GenerateHlsUriRequest request =
       GenerateHlsUriRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .addAllTemporalPartitions(new ArrayList<Partition.TemporalPartition>())
           .setLiveViewEnabled(true)
           .build();
   GenerateHlsUriResponse response = warehouseClient.generateHlsUri(request);
 }
 
Parameter
Name Description
request GenerateHlsUriRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GenerateHlsUriResponse

generateHlsUriCallable()

public final UnaryCallable<GenerateHlsUriRequest,GenerateHlsUriResponse> generateHlsUriCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GenerateHlsUriRequest request =
       GenerateHlsUriRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .addAllTemporalPartitions(new ArrayList<Partition.TemporalPartition>())
           .setLiveViewEnabled(true)
           .build();
   ApiFuture<GenerateHlsUriResponse> future =
       warehouseClient.generateHlsUriCallable().futureCall(request);
   // Do something.
   GenerateHlsUriResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateHlsUriRequest,GenerateHlsUriResponse>

generateRetrievalUrl(GenerateRetrievalUrlRequest request)

public final 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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GenerateRetrievalUrlRequest request =
       GenerateRetrievalUrlRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   GenerateRetrievalUrlResponse response = warehouseClient.generateRetrievalUrl(request);
 }
 
Parameter
Name Description
request GenerateRetrievalUrlRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GenerateRetrievalUrlResponse

generateRetrievalUrlCallable()

public final UnaryCallable<GenerateRetrievalUrlRequest,GenerateRetrievalUrlResponse> generateRetrievalUrlCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GenerateRetrievalUrlRequest request =
       GenerateRetrievalUrlRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   ApiFuture<GenerateRetrievalUrlResponse> future =
       warehouseClient.generateRetrievalUrlCallable().futureCall(request);
   // Do something.
   GenerateRetrievalUrlResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateRetrievalUrlRequest,GenerateRetrievalUrlResponse>

getAnnotation(AnnotationName name)

public final Annotation getAnnotation(AnnotationName name)

Reads annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AnnotationName name =
       AnnotationName.of(
           "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]");
   Annotation response = warehouseClient.getAnnotation(name);
 }
 
Parameter
Name Description
name AnnotationName

Required. The name of the annotation to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

Returns
Type Description
Annotation

getAnnotation(GetAnnotationRequest request)

public final Annotation getAnnotation(GetAnnotationRequest request)

Reads annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetAnnotationRequest request =
       GetAnnotationRequest.newBuilder()
           .setName(
               AnnotationName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
                   .toString())
           .build();
   Annotation response = warehouseClient.getAnnotation(request);
 }
 
Parameter
Name Description
request GetAnnotationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Annotation

getAnnotation(String name)

public final Annotation getAnnotation(String name)

Reads annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
           .toString();
   Annotation response = warehouseClient.getAnnotation(name);
 }
 
Parameter
Name Description
name String

Required. The name of the annotation to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

Returns
Type Description
Annotation

getAnnotationCallable()

public final UnaryCallable<GetAnnotationRequest,Annotation> getAnnotationCallable()

Reads annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetAnnotationRequest request =
       GetAnnotationRequest.newBuilder()
           .setName(
               AnnotationName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
                   .toString())
           .build();
   ApiFuture<Annotation> future = warehouseClient.getAnnotationCallable().futureCall(request);
   // Do something.
   Annotation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetAnnotationRequest,Annotation>

getAsset(AssetName name)

public final Asset getAsset(AssetName name)

Reads an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
   Asset response = warehouseClient.getAsset(name);
 }
 
Parameter
Name Description
name AssetName

Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
Asset

getAsset(GetAssetRequest request)

public final Asset getAsset(GetAssetRequest request)

Reads an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetAssetRequest request =
       GetAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   Asset response = warehouseClient.getAsset(request);
 }
 
Parameter
Name Description
request GetAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Asset

getAsset(String name)

public final Asset getAsset(String name)

Reads an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
   Asset response = warehouseClient.getAsset(name);
 }
 
Parameter
Name Description
name String

Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
Asset

getAssetCallable()

public final UnaryCallable<GetAssetRequest,Asset> getAssetCallable()

Reads an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetAssetRequest request =
       GetAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .build();
   ApiFuture<Asset> future = warehouseClient.getAssetCallable().futureCall(request);
   // Do something.
   Asset response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetAssetRequest,Asset>

getCollection(CollectionName name)

public final Collection getCollection(CollectionName name)

Gets a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CollectionName name =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
   Collection response = warehouseClient.getCollection(name);
 }
 
Parameter
Name Description
name CollectionName

Required. The name of the collection to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
Collection

getCollection(GetCollectionRequest request)

public final Collection getCollection(GetCollectionRequest request)

Gets a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetCollectionRequest request =
       GetCollectionRequest.newBuilder()
           .setName(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .build();
   Collection response = warehouseClient.getCollection(request);
 }
 
Parameter
Name Description
request GetCollectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Collection

getCollection(String name)

public final Collection getCollection(String name)

Gets a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
           .toString();
   Collection response = warehouseClient.getCollection(name);
 }
 
Parameter
Name Description
name String

Required. The name of the collection to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
Collection

getCollectionCallable()

public final UnaryCallable<GetCollectionRequest,Collection> getCollectionCallable()

Gets a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetCollectionRequest request =
       GetCollectionRequest.newBuilder()
           .setName(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .build();
   ApiFuture<Collection> future = warehouseClient.getCollectionCallable().futureCall(request);
   // Do something.
   Collection response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetCollectionRequest,Collection>

getCorpus(CorpusName name)

public final Corpus getCorpus(CorpusName name)

Gets corpus details inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   Corpus response = warehouseClient.getCorpus(name);
 }
 
Parameter
Name Description
name CorpusName

Required. The resource name of the corpus to retrieve.

Returns
Type Description
Corpus

getCorpus(GetCorpusRequest request)

public final Corpus getCorpus(GetCorpusRequest request)

Gets corpus details inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetCorpusRequest request =
       GetCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   Corpus response = warehouseClient.getCorpus(request);
 }
 
Parameter
Name Description
request GetCorpusRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Corpus

getCorpus(String name)

public final Corpus getCorpus(String name)

Gets corpus details inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   Corpus response = warehouseClient.getCorpus(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the corpus to retrieve.

Returns
Type Description
Corpus

getCorpusCallable()

public final UnaryCallable<GetCorpusRequest,Corpus> getCorpusCallable()

Gets corpus details inside a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetCorpusRequest request =
       GetCorpusRequest.newBuilder()
           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   ApiFuture<Corpus> future = warehouseClient.getCorpusCallable().futureCall(request);
   // Do something.
   Corpus response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetCorpusRequest,Corpus>

getDataSchema(DataSchemaName name)

public final DataSchema getDataSchema(DataSchemaName name)

Gets data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DataSchemaName name =
       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]");
   DataSchema response = warehouseClient.getDataSchema(name);
 }
 
Parameter
Name Description
name DataSchemaName

Required. The name of the data schema to retrieve. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}

Returns
Type Description
DataSchema

getDataSchema(GetDataSchemaRequest request)

public final DataSchema getDataSchema(GetDataSchemaRequest request)

Gets data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetDataSchemaRequest request =
       GetDataSchemaRequest.newBuilder()
           .setName(
               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
                   .toString())
           .build();
   DataSchema response = warehouseClient.getDataSchema(request);
 }
 
Parameter
Name Description
request GetDataSchemaRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DataSchema

getDataSchema(String name)

public final DataSchema getDataSchema(String name)

Gets data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
           .toString();
   DataSchema response = warehouseClient.getDataSchema(name);
 }
 
Parameter
Name Description
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}

Returns
Type Description
DataSchema

getDataSchemaCallable()

public final UnaryCallable<GetDataSchemaRequest,DataSchema> getDataSchemaCallable()

Gets data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetDataSchemaRequest request =
       GetDataSchemaRequest.newBuilder()
           .setName(
               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
                   .toString())
           .build();
   ApiFuture<DataSchema> future = warehouseClient.getDataSchemaCallable().futureCall(request);
   // Do something.
   DataSchema response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetDataSchemaRequest,DataSchema>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getIndex(GetIndexRequest request)

public final Index getIndex(GetIndexRequest request)

Gets the details of a single Index under a Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetIndexRequest request =
       GetIndexRequest.newBuilder()
           .setName(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   Index response = warehouseClient.getIndex(request);
 }
 
Parameter
Name Description
request GetIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Index

getIndex(IndexName name)

public final Index getIndex(IndexName name)

Gets the details of a single Index under a Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
   Index response = warehouseClient.getIndex(name);
 }
 
Parameter
Name Description
name IndexName

Required. Name of the Index resource. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
Index

getIndex(String name)

public final Index getIndex(String name)

Gets the details of a single Index under a Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
   Index response = warehouseClient.getIndex(name);
 }
 
Parameter
Name Description
name String

Required. Name of the Index resource. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
Index

getIndexCallable()

public final UnaryCallable<GetIndexRequest,Index> getIndexCallable()

Gets the details of a single Index under a Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetIndexRequest request =
       GetIndexRequest.newBuilder()
           .setName(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   ApiFuture<Index> future = warehouseClient.getIndexCallable().futureCall(request);
   // Do something.
   Index response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetIndexRequest,Index>

getIndexEndpoint(GetIndexEndpointRequest request)

public final IndexEndpoint getIndexEndpoint(GetIndexEndpointRequest request)

Gets an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetIndexEndpointRequest request =
       GetIndexEndpointRequest.newBuilder()
           .setName(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   IndexEndpoint response = warehouseClient.getIndexEndpoint(request);
 }
 
Parameter
Name Description
request GetIndexEndpointRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
IndexEndpoint

getIndexEndpoint(IndexEndpointName name)

public final IndexEndpoint getIndexEndpoint(IndexEndpointName name)

Gets an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
   IndexEndpoint response = warehouseClient.getIndexEndpoint(name);
 }
 
Parameter
Name Description
name IndexEndpointName

Required. Name of the IndexEndpoint resource.

Returns
Type Description
IndexEndpoint

getIndexEndpoint(String name)

public final IndexEndpoint getIndexEndpoint(String name)

Gets an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
   IndexEndpoint response = warehouseClient.getIndexEndpoint(name);
 }
 
Parameter
Name Description
name String

Required. Name of the IndexEndpoint resource.

Returns
Type Description
IndexEndpoint

getIndexEndpointCallable()

public final UnaryCallable<GetIndexEndpointRequest,IndexEndpoint> getIndexEndpointCallable()

Gets an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetIndexEndpointRequest request =
       GetIndexEndpointRequest.newBuilder()
           .setName(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   ApiFuture<IndexEndpoint> future =
       warehouseClient.getIndexEndpointCallable().futureCall(request);
   // Do something.
   IndexEndpoint response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetIndexEndpointRequest,IndexEndpoint>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSearchConfig(GetSearchConfigRequest request)

public final SearchConfig getSearchConfig(GetSearchConfigRequest request)

Gets a search configuration inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetSearchConfigRequest request =
       GetSearchConfigRequest.newBuilder()
           .setName(
               SearchConfigName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
                   .toString())
           .build();
   SearchConfig response = warehouseClient.getSearchConfig(request);
 }
 
Parameter
Name Description
request GetSearchConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchConfig

getSearchConfig(SearchConfigName name)

public final SearchConfig getSearchConfig(SearchConfigName name)

Gets a search configuration inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchConfigName name =
       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]");
   SearchConfig response = warehouseClient.getSearchConfig(name);
 }
 
Parameter
Name Description
name SearchConfigName

Required. The name of the search configuration to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

Returns
Type Description
SearchConfig

getSearchConfig(String name)

public final SearchConfig getSearchConfig(String name)

Gets a search configuration inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
           .toString();
   SearchConfig response = warehouseClient.getSearchConfig(name);
 }
 
Parameter
Name Description
name String

Required. The name of the search configuration to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

Returns
Type Description
SearchConfig

getSearchConfigCallable()

public final UnaryCallable<GetSearchConfigRequest,SearchConfig> getSearchConfigCallable()

Gets a search configuration inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetSearchConfigRequest request =
       GetSearchConfigRequest.newBuilder()
           .setName(
               SearchConfigName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
                   .toString())
           .build();
   ApiFuture<SearchConfig> future =
       warehouseClient.getSearchConfigCallable().futureCall(request);
   // Do something.
   SearchConfig response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetSearchConfigRequest,SearchConfig>

getSearchHypernym(GetSearchHypernymRequest request)

public final SearchHypernym getSearchHypernym(GetSearchHypernymRequest request)

Gets a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetSearchHypernymRequest request =
       GetSearchHypernymRequest.newBuilder()
           .setName(
               SearchHypernymName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
                   .toString())
           .build();
   SearchHypernym response = warehouseClient.getSearchHypernym(request);
 }
 
Parameter
Name Description
request GetSearchHypernymRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchHypernym

getSearchHypernym(SearchHypernymName name)

public final SearchHypernym getSearchHypernym(SearchHypernymName name)

Gets a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchHypernymName name =
       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]");
   SearchHypernym response = warehouseClient.getSearchHypernym(name);
 }
 
Parameter
Name Description
name SearchHypernymName

Required. The name of the SearchHypernym to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

Returns
Type Description
SearchHypernym

getSearchHypernym(String name)

public final SearchHypernym getSearchHypernym(String name)

Gets a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String name =
       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
           .toString();
   SearchHypernym response = warehouseClient.getSearchHypernym(name);
 }
 
Parameter
Name Description
name String

Required. The name of the SearchHypernym to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

Returns
Type Description
SearchHypernym

getSearchHypernymCallable()

public final UnaryCallable<GetSearchHypernymRequest,SearchHypernym> getSearchHypernymCallable()

Gets a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   GetSearchHypernymRequest request =
       GetSearchHypernymRequest.newBuilder()
           .setName(
               SearchHypernymName.of(
                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
                   .toString())
           .build();
   ApiFuture<SearchHypernym> future =
       warehouseClient.getSearchHypernymCallable().futureCall(request);
   // Do something.
   SearchHypernym response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetSearchHypernymRequest,SearchHypernym>

getSettings()

public final WarehouseSettings getSettings()
Returns
Type Description
WarehouseSettings

getStub()

public WarehouseStub getStub()
Returns
Type Description
WarehouseStub

importAssetsAsync(ImportAssetsRequest request)

public final OperationFuture<ImportAssetsResponse,ImportAssetsMetadata> importAssetsAsync(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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ImportAssetsRequest request =
       ImportAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   ImportAssetsResponse response = warehouseClient.importAssetsAsync(request).get();
 }
 
Parameter
Name Description
request ImportAssetsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<ImportAssetsResponse,ImportAssetsMetadata>

importAssetsCallable()

public final UnaryCallable<ImportAssetsRequest,Operation> importAssetsCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ImportAssetsRequest request =
       ImportAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.importAssetsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ImportAssetsRequest,Operation>

importAssetsOperationCallable()

public final OperationCallable<ImportAssetsRequest,ImportAssetsResponse,ImportAssetsMetadata> importAssetsOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ImportAssetsRequest request =
       ImportAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .build();
   OperationFuture<ImportAssetsResponse, ImportAssetsMetadata> future =
       warehouseClient.importAssetsOperationCallable().futureCall(request);
   // Do something.
   ImportAssetsResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<ImportAssetsRequest,ImportAssetsResponse,ImportAssetsMetadata>

indexAssetAsync(IndexAssetRequest request)

public final OperationFuture<IndexAssetResponse,IndexAssetMetadata> indexAssetAsync(IndexAssetRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexAssetRequest request =
       IndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   IndexAssetResponse response = warehouseClient.indexAssetAsync(request).get();
 }
 
Parameter
Name Description
request IndexAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<IndexAssetResponse,IndexAssetMetadata>

indexAssetCallable()

public final UnaryCallable<IndexAssetRequest,Operation> indexAssetCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexAssetRequest request =
       IndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.indexAssetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<IndexAssetRequest,Operation>

indexAssetOperationCallable()

public final OperationCallable<IndexAssetRequest,IndexAssetResponse,IndexAssetMetadata> indexAssetOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexAssetRequest request =
       IndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   OperationFuture<IndexAssetResponse, IndexAssetMetadata> future =
       warehouseClient.indexAssetOperationCallable().futureCall(request);
   // Do something.
   IndexAssetResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<IndexAssetRequest,IndexAssetResponse,IndexAssetMetadata>

ingestAssetCallable()

public final BidiStreamingCallable<IngestAssetRequest,IngestAssetResponse> ingestAssetCallable()

Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   BidiStream<IngestAssetRequest, IngestAssetResponse> bidiStream =
       warehouseClient.ingestAssetCallable().call();
   IngestAssetRequest request = IngestAssetRequest.newBuilder().build();
   bidiStream.send(request);
   for (IngestAssetResponse response : bidiStream) {
     // Do something when a response is received.
   }
 }
 
Returns
Type Description
BidiStreamingCallable<IngestAssetRequest,IngestAssetResponse>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listAnnotations(AssetName parent)

public final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(AssetName parent)

Lists a list of annotations inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
   for (Annotation element : warehouseClient.listAnnotations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent AssetName

The parent, which owns this collection of annotations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
WarehouseClient.ListAnnotationsPagedResponse

listAnnotations(ListAnnotationsRequest request)

public final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request)

Lists a list of annotations inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAnnotationsRequest request =
       ListAnnotationsRequest.newBuilder()
           .setParent(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (Annotation element : warehouseClient.listAnnotations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListAnnotationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListAnnotationsPagedResponse

listAnnotations(String parent)

public final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(String parent)

Lists a list of annotations inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent =
       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
   for (Annotation element : warehouseClient.listAnnotations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

The parent, which owns this collection of annotations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

Returns
Type Description
WarehouseClient.ListAnnotationsPagedResponse

listAnnotationsCallable()

public final UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse> listAnnotationsCallable()

Lists a list of annotations inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAnnotationsRequest request =
       ListAnnotationsRequest.newBuilder()
           .setParent(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListAnnotationsResponse response = warehouseClient.listAnnotationsCallable().call(request);
     for (Annotation element : response.getAnnotationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse>

listAnnotationsPagedCallable()

public final UnaryCallable<ListAnnotationsRequest,WarehouseClient.ListAnnotationsPagedResponse> listAnnotationsPagedCallable()

Lists a list of annotations inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAnnotationsRequest request =
       ListAnnotationsRequest.newBuilder()
           .setParent(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Annotation> future =
       warehouseClient.listAnnotationsPagedCallable().futureCall(request);
   // Do something.
   for (Annotation element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAnnotationsRequest,ListAnnotationsPagedResponse>

listAssets(CorpusName parent)

public final WarehouseClient.ListAssetsPagedResponse listAssets(CorpusName parent)

Lists an list of assets inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (Asset element : warehouseClient.listAssets(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent, which owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListAssetsPagedResponse

listAssets(ListAssetsRequest request)

public final WarehouseClient.ListAssetsPagedResponse listAssets(ListAssetsRequest request)

Lists an list of assets inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (Asset element : warehouseClient.listAssets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListAssetsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListAssetsPagedResponse

listAssets(String parent)

public final WarehouseClient.ListAssetsPagedResponse listAssets(String parent)

Lists an list of assets inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (Asset element : warehouseClient.listAssets(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListAssetsPagedResponse

listAssetsCallable()

public final UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()

Lists an list of assets inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListAssetsResponse response = warehouseClient.listAssetsCallable().call(request);
     for (Asset element : response.getAssetsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAssetsRequest,ListAssetsResponse>

listAssetsPagedCallable()

public final UnaryCallable<ListAssetsRequest,WarehouseClient.ListAssetsPagedResponse> listAssetsPagedCallable()

Lists an list of assets inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListAssetsRequest request =
       ListAssetsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Asset> future = warehouseClient.listAssetsPagedCallable().futureCall(request);
   // Do something.
   for (Asset element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAssetsRequest,ListAssetsPagedResponse>

listCollections(CorpusName parent)

public final WarehouseClient.ListCollectionsPagedResponse listCollections(CorpusName parent)

Lists collections inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (Collection element : warehouseClient.listCollections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent corpus. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListCollectionsPagedResponse

listCollections(ListCollectionsRequest request)

public final WarehouseClient.ListCollectionsPagedResponse listCollections(ListCollectionsRequest request)

Lists collections inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCollectionsRequest request =
       ListCollectionsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Collection element : warehouseClient.listCollections(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListCollectionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListCollectionsPagedResponse

listCollections(String parent)

public final WarehouseClient.ListCollectionsPagedResponse listCollections(String parent)

Lists collections inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (Collection element : warehouseClient.listCollections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent corpus. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListCollectionsPagedResponse

listCollectionsCallable()

public final UnaryCallable<ListCollectionsRequest,ListCollectionsResponse> listCollectionsCallable()

Lists collections inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCollectionsRequest request =
       ListCollectionsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListCollectionsResponse response = warehouseClient.listCollectionsCallable().call(request);
     for (Collection element : response.getCollectionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCollectionsRequest,ListCollectionsResponse>

listCollectionsPagedCallable()

public final UnaryCallable<ListCollectionsRequest,WarehouseClient.ListCollectionsPagedResponse> listCollectionsPagedCallable()

Lists collections inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCollectionsRequest request =
       ListCollectionsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Collection> future =
       warehouseClient.listCollectionsPagedCallable().futureCall(request);
   // Do something.
   for (Collection element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCollectionsRequest,ListCollectionsPagedResponse>

listCorpora(ListCorporaRequest request)

public final WarehouseClient.ListCorporaPagedResponse listCorpora(ListCorporaRequest request)

Lists all corpora in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCorporaRequest request =
       ListCorporaRequest.newBuilder()
           .setParent("parent-995424086")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (Corpus element : warehouseClient.listCorpora(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListCorporaRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListCorporaPagedResponse

listCorpora(String parent)

public final WarehouseClient.ListCorporaPagedResponse listCorpora(String parent)

Lists all corpora in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = "parent-995424086";
   for (Corpus element : warehouseClient.listCorpora(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The resource name of the project from which to list corpora.

Returns
Type Description
WarehouseClient.ListCorporaPagedResponse

listCorporaCallable()

public final UnaryCallable<ListCorporaRequest,ListCorporaResponse> listCorporaCallable()

Lists all corpora in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCorporaRequest request =
       ListCorporaRequest.newBuilder()
           .setParent("parent-995424086")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListCorporaResponse response = warehouseClient.listCorporaCallable().call(request);
     for (Corpus element : response.getCorporaList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCorporaRequest,ListCorporaResponse>

listCorporaPagedCallable()

public final UnaryCallable<ListCorporaRequest,WarehouseClient.ListCorporaPagedResponse> listCorporaPagedCallable()

Lists all corpora in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListCorporaRequest request =
       ListCorporaRequest.newBuilder()
           .setParent("parent-995424086")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Corpus> future = warehouseClient.listCorporaPagedCallable().futureCall(request);
   // Do something.
   for (Corpus element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCorporaRequest,ListCorporaPagedResponse>

listDataSchemas(CorpusName parent)

public final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(CorpusName parent)

Lists a list of data schemas inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (DataSchema element : warehouseClient.listDataSchemas(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent, which owns this collection of data schemas. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

Returns
Type Description
WarehouseClient.ListDataSchemasPagedResponse

listDataSchemas(ListDataSchemasRequest request)

public final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(ListDataSchemasRequest request)

Lists a list of data schemas inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListDataSchemasRequest request =
       ListDataSchemasRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (DataSchema element : warehouseClient.listDataSchemas(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListDataSchemasRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListDataSchemasPagedResponse

listDataSchemas(String parent)

public final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(String parent)

Lists a list of data schemas inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (DataSchema element : warehouseClient.listDataSchemas(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of data schemas. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

Returns
Type Description
WarehouseClient.ListDataSchemasPagedResponse

listDataSchemasCallable()

public final UnaryCallable<ListDataSchemasRequest,ListDataSchemasResponse> listDataSchemasCallable()

Lists a list of data schemas inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListDataSchemasRequest request =
       ListDataSchemasRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListDataSchemasResponse response = warehouseClient.listDataSchemasCallable().call(request);
     for (DataSchema element : response.getDataSchemasList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataSchemasRequest,ListDataSchemasResponse>

listDataSchemasPagedCallable()

public final UnaryCallable<ListDataSchemasRequest,WarehouseClient.ListDataSchemasPagedResponse> listDataSchemasPagedCallable()

Lists a list of data schemas inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListDataSchemasRequest request =
       ListDataSchemasRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<DataSchema> future =
       warehouseClient.listDataSchemasPagedCallable().futureCall(request);
   // Do something.
   for (DataSchema element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataSchemasRequest,ListDataSchemasPagedResponse>

listIndexEndpoints(ListIndexEndpointsRequest request)

public final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(ListIndexEndpointsRequest request)

Lists all IndexEndpoints in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexEndpointsRequest request =
       ListIndexEndpointsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListIndexEndpointsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListIndexEndpointsPagedResponse

listIndexEndpoints(LocationName parent)

public final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(LocationName parent)

Lists all IndexEndpoints in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Format: projects/{project}/locations/{location}

Returns
Type Description
WarehouseClient.ListIndexEndpointsPagedResponse

listIndexEndpoints(String parent)

public final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(String parent)

Lists all IndexEndpoints in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. Format: projects/{project}/locations/{location}

Returns
Type Description
WarehouseClient.ListIndexEndpointsPagedResponse

listIndexEndpointsCallable()

public final UnaryCallable<ListIndexEndpointsRequest,ListIndexEndpointsResponse> listIndexEndpointsCallable()

Lists all IndexEndpoints in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexEndpointsRequest request =
       ListIndexEndpointsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListIndexEndpointsResponse response =
         warehouseClient.listIndexEndpointsCallable().call(request);
     for (IndexEndpoint element : response.getIndexEndpointsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListIndexEndpointsRequest,ListIndexEndpointsResponse>

listIndexEndpointsPagedCallable()

public final UnaryCallable<ListIndexEndpointsRequest,WarehouseClient.ListIndexEndpointsPagedResponse> listIndexEndpointsPagedCallable()

Lists all IndexEndpoints in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexEndpointsRequest request =
       ListIndexEndpointsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<IndexEndpoint> future =
       warehouseClient.listIndexEndpointsPagedCallable().futureCall(request);
   // Do something.
   for (IndexEndpoint element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListIndexEndpointsRequest,ListIndexEndpointsPagedResponse>

listIndexes(CorpusName parent)

public final WarehouseClient.ListIndexesPagedResponse listIndexes(CorpusName parent)

List all Indexes in a given Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (Index element : warehouseClient.listIndexes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent corpus that owns this collection of indexes. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListIndexesPagedResponse

listIndexes(ListIndexesRequest request)

public final WarehouseClient.ListIndexesPagedResponse listIndexes(ListIndexesRequest request)

List all Indexes in a given Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexesRequest request =
       ListIndexesRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Index element : warehouseClient.listIndexes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListIndexesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListIndexesPagedResponse

listIndexes(String parent)

public final WarehouseClient.ListIndexesPagedResponse listIndexes(String parent)

List all Indexes in a given Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (Index element : warehouseClient.listIndexes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent corpus that owns this collection of indexes. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListIndexesPagedResponse

listIndexesCallable()

public final UnaryCallable<ListIndexesRequest,ListIndexesResponse> listIndexesCallable()

List all Indexes in a given Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexesRequest request =
       ListIndexesRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListIndexesResponse response = warehouseClient.listIndexesCallable().call(request);
     for (Index element : response.getIndexesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListIndexesRequest,ListIndexesResponse>

listIndexesPagedCallable()

public final UnaryCallable<ListIndexesRequest,WarehouseClient.ListIndexesPagedResponse> listIndexesPagedCallable()

List all Indexes in a given Corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListIndexesRequest request =
       ListIndexesRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Index> future = warehouseClient.listIndexesPagedCallable().futureCall(request);
   // Do something.
   for (Index element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListIndexesRequest,ListIndexesPagedResponse>

listSearchConfigs(CorpusName parent)

public final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(CorpusName parent)

Lists all search configurations inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (SearchConfig element : warehouseClient.listSearchConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent, which owns this collection of search configurations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListSearchConfigsPagedResponse

listSearchConfigs(ListSearchConfigsRequest request)

public final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(ListSearchConfigsRequest request)

Lists all search configurations inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchConfigsRequest request =
       ListSearchConfigsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (SearchConfig element : warehouseClient.listSearchConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListSearchConfigsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListSearchConfigsPagedResponse

listSearchConfigs(String parent)

public final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(String parent)

Lists all search configurations inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (SearchConfig element : warehouseClient.listSearchConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of search configurations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListSearchConfigsPagedResponse

listSearchConfigsCallable()

public final UnaryCallable<ListSearchConfigsRequest,ListSearchConfigsResponse> listSearchConfigsCallable()

Lists all search configurations inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchConfigsRequest request =
       ListSearchConfigsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListSearchConfigsResponse response =
         warehouseClient.listSearchConfigsCallable().call(request);
     for (SearchConfig element : response.getSearchConfigsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListSearchConfigsRequest,ListSearchConfigsResponse>

listSearchConfigsPagedCallable()

public final UnaryCallable<ListSearchConfigsRequest,WarehouseClient.ListSearchConfigsPagedResponse> listSearchConfigsPagedCallable()

Lists all search configurations inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchConfigsRequest request =
       ListSearchConfigsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<SearchConfig> future =
       warehouseClient.listSearchConfigsPagedCallable().futureCall(request);
   // Do something.
   for (SearchConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListSearchConfigsRequest,ListSearchConfigsPagedResponse>

listSearchHypernyms(CorpusName parent)

public final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(CorpusName parent)

Lists SearchHypernyms inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
   for (SearchHypernym element : warehouseClient.listSearchHypernyms(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent CorpusName

Required. The parent, which owns this collection of SearchHypernyms. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListSearchHypernymsPagedResponse

listSearchHypernyms(ListSearchHypernymsRequest request)

public final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(ListSearchHypernymsRequest request)

Lists SearchHypernyms inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchHypernymsRequest request =
       ListSearchHypernymsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (SearchHypernym element : warehouseClient.listSearchHypernyms(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListSearchHypernymsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ListSearchHypernymsPagedResponse

listSearchHypernyms(String parent)

public final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(String parent)

Lists SearchHypernyms inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
   for (SearchHypernym element : warehouseClient.listSearchHypernyms(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent, which owns this collection of SearchHypernyms. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

Returns
Type Description
WarehouseClient.ListSearchHypernymsPagedResponse

listSearchHypernymsCallable()

public final UnaryCallable<ListSearchHypernymsRequest,ListSearchHypernymsResponse> listSearchHypernymsCallable()

Lists SearchHypernyms inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchHypernymsRequest request =
       ListSearchHypernymsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListSearchHypernymsResponse response =
         warehouseClient.listSearchHypernymsCallable().call(request);
     for (SearchHypernym element : response.getSearchHypernymsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListSearchHypernymsRequest,ListSearchHypernymsResponse>

listSearchHypernymsPagedCallable()

public final UnaryCallable<ListSearchHypernymsRequest,WarehouseClient.ListSearchHypernymsPagedResponse> listSearchHypernymsPagedCallable()

Lists SearchHypernyms inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ListSearchHypernymsRequest request =
       ListSearchHypernymsRequest.newBuilder()
           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<SearchHypernym> future =
       warehouseClient.listSearchHypernymsPagedCallable().futureCall(request);
   // Do something.
   for (SearchHypernym element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListSearchHypernymsRequest,ListSearchHypernymsPagedResponse>

removeCollectionItem(CollectionItem item)

public final RemoveCollectionItemResponse removeCollectionItem(CollectionItem item)

Removes an item from a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CollectionItem item = CollectionItem.newBuilder().build();
   RemoveCollectionItemResponse response = warehouseClient.removeCollectionItem(item);
 }
 
Parameter
Name Description
item CollectionItem

Required. The item to be removed.

Returns
Type Description
RemoveCollectionItemResponse

removeCollectionItem(RemoveCollectionItemRequest request)

public final RemoveCollectionItemResponse removeCollectionItem(RemoveCollectionItemRequest request)

Removes an item from a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   RemoveCollectionItemRequest request =
       RemoveCollectionItemRequest.newBuilder()
           .setItem(CollectionItem.newBuilder().build())
           .build();
   RemoveCollectionItemResponse response = warehouseClient.removeCollectionItem(request);
 }
 
Parameter
Name Description
request RemoveCollectionItemRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RemoveCollectionItemResponse

removeCollectionItemCallable()

public final UnaryCallable<RemoveCollectionItemRequest,RemoveCollectionItemResponse> removeCollectionItemCallable()

Removes an item from a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   RemoveCollectionItemRequest request =
       RemoveCollectionItemRequest.newBuilder()
           .setItem(CollectionItem.newBuilder().build())
           .build();
   ApiFuture<RemoveCollectionItemResponse> future =
       warehouseClient.removeCollectionItemCallable().futureCall(request);
   // Do something.
   RemoveCollectionItemResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RemoveCollectionItemRequest,RemoveCollectionItemResponse>

removeIndexAssetAsync(RemoveIndexAssetRequest request)

public final OperationFuture<RemoveIndexAssetResponse,RemoveIndexAssetMetadata> removeIndexAssetAsync(RemoveIndexAssetRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   RemoveIndexAssetRequest request =
       RemoveIndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   RemoveIndexAssetResponse response = warehouseClient.removeIndexAssetAsync(request).get();
 }
 
Parameter
Name Description
request RemoveIndexAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RemoveIndexAssetResponse,RemoveIndexAssetMetadata>

removeIndexAssetCallable()

public final UnaryCallable<RemoveIndexAssetRequest,Operation> removeIndexAssetCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   RemoveIndexAssetRequest request =
       RemoveIndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.removeIndexAssetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RemoveIndexAssetRequest,Operation>

removeIndexAssetOperationCallable()

public final OperationCallable<RemoveIndexAssetRequest,RemoveIndexAssetResponse,RemoveIndexAssetMetadata> removeIndexAssetOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   RemoveIndexAssetRequest request =
       RemoveIndexAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .build();
   OperationFuture<RemoveIndexAssetResponse, RemoveIndexAssetMetadata> future =
       warehouseClient.removeIndexAssetOperationCallable().futureCall(request);
   // Do something.
   RemoveIndexAssetResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<RemoveIndexAssetRequest,RemoveIndexAssetResponse,RemoveIndexAssetMetadata>

searchAssets(SearchAssetsRequest request)

public final WarehouseClient.SearchAssetsPagedResponse searchAssets(SearchAssetsRequest request)

Search media asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchAssetsRequest request =
       SearchAssetsRequest.newBuilder()
           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllFacetSelections(new ArrayList<FacetGroup>())
           .addAllResultAnnotationKeys(new ArrayList<String>())
           .setSearchQuery("searchQuery-552137728")
           .build();
   for (SearchResultItem element : warehouseClient.searchAssets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request SearchAssetsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.SearchAssetsPagedResponse

searchAssetsCallable()

public final UnaryCallable<SearchAssetsRequest,SearchAssetsResponse> searchAssetsCallable()

Search media asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchAssetsRequest request =
       SearchAssetsRequest.newBuilder()
           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllFacetSelections(new ArrayList<FacetGroup>())
           .addAllResultAnnotationKeys(new ArrayList<String>())
           .setSearchQuery("searchQuery-552137728")
           .build();
   while (true) {
     SearchAssetsResponse response = warehouseClient.searchAssetsCallable().call(request);
     for (SearchResultItem element : response.getSearchResultItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<SearchAssetsRequest,SearchAssetsResponse>

searchAssetsPagedCallable()

public final UnaryCallable<SearchAssetsRequest,WarehouseClient.SearchAssetsPagedResponse> searchAssetsPagedCallable()

Search media asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchAssetsRequest request =
       SearchAssetsRequest.newBuilder()
           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllFacetSelections(new ArrayList<FacetGroup>())
           .addAllResultAnnotationKeys(new ArrayList<String>())
           .setSearchQuery("searchQuery-552137728")
           .build();
   ApiFuture<SearchResultItem> future =
       warehouseClient.searchAssetsPagedCallable().futureCall(request);
   // Do something.
   for (SearchResultItem element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<SearchAssetsRequest,SearchAssetsPagedResponse>

searchIndexEndpoint(SearchIndexEndpointRequest request)

public final WarehouseClient.SearchIndexEndpointPagedResponse searchIndexEndpoint(SearchIndexEndpointRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchIndexEndpointRequest request =
       SearchIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllExclusionCriteria(new ArrayList<Criteria>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (SearchResultItem element : warehouseClient.searchIndexEndpoint(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request SearchIndexEndpointRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.SearchIndexEndpointPagedResponse

searchIndexEndpointCallable()

public final UnaryCallable<SearchIndexEndpointRequest,SearchIndexEndpointResponse> searchIndexEndpointCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchIndexEndpointRequest request =
       SearchIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllExclusionCriteria(new ArrayList<Criteria>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     SearchIndexEndpointResponse response =
         warehouseClient.searchIndexEndpointCallable().call(request);
     for (SearchResultItem element : response.getSearchResultItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<SearchIndexEndpointRequest,SearchIndexEndpointResponse>

searchIndexEndpointPagedCallable()

public final UnaryCallable<SearchIndexEndpointRequest,WarehouseClient.SearchIndexEndpointPagedResponse> searchIndexEndpointPagedCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchIndexEndpointRequest request =
       SearchIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .addAllCriteria(new ArrayList<Criteria>())
           .addAllExclusionCriteria(new ArrayList<Criteria>())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<SearchResultItem> future =
       warehouseClient.searchIndexEndpointPagedCallable().futureCall(request);
   // Do something.
   for (SearchResultItem element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<SearchIndexEndpointRequest,SearchIndexEndpointPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

undeployIndexAsync(UndeployIndexRequest request)

public final OperationFuture<UndeployIndexResponse,UndeployIndexMetadata> undeployIndexAsync(UndeployIndexRequest request)

Undeploys an Index from IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UndeployIndexRequest request =
       UndeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   UndeployIndexResponse response = warehouseClient.undeployIndexAsync(request).get();
 }
 
Parameter
Name Description
request UndeployIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<UndeployIndexResponse,UndeployIndexMetadata>

undeployIndexCallable()

public final UnaryCallable<UndeployIndexRequest,Operation> undeployIndexCallable()

Undeploys an Index from IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UndeployIndexRequest request =
       UndeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   ApiFuture<Operation> future = warehouseClient.undeployIndexCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UndeployIndexRequest,Operation>

undeployIndexOperationCallable()

public final OperationCallable<UndeployIndexRequest,UndeployIndexResponse,UndeployIndexMetadata> undeployIndexOperationCallable()

Undeploys an Index from IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UndeployIndexRequest request =
       UndeployIndexRequest.newBuilder()
           .setIndexEndpoint(
               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
           .build();
   OperationFuture<UndeployIndexResponse, UndeployIndexMetadata> future =
       warehouseClient.undeployIndexOperationCallable().futureCall(request);
   // Do something.
   UndeployIndexResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<UndeployIndexRequest,UndeployIndexResponse,UndeployIndexMetadata>

updateAnnotation(Annotation annotation, FieldMask updateMask)

public final Annotation updateAnnotation(Annotation annotation, FieldMask updateMask)

Updates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   Annotation annotation = Annotation.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Annotation response = warehouseClient.updateAnnotation(annotation, updateMask);
 }
 
Parameters
Name Description
annotation Annotation

Required. The annotation to update. The annotation's name field is used to identify the annotation to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

updateMask FieldMask

The list of fields to be updated.

Returns
Type Description
Annotation

updateAnnotation(UpdateAnnotationRequest request)

public final Annotation updateAnnotation(UpdateAnnotationRequest request)

Updates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateAnnotationRequest request =
       UpdateAnnotationRequest.newBuilder()
           .setAnnotation(Annotation.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Annotation response = warehouseClient.updateAnnotation(request);
 }
 
Parameter
Name Description
request UpdateAnnotationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Annotation

updateAnnotationCallable()

public final UnaryCallable<UpdateAnnotationRequest,Annotation> updateAnnotationCallable()

Updates annotation inside asset.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateAnnotationRequest request =
       UpdateAnnotationRequest.newBuilder()
           .setAnnotation(Annotation.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Annotation> future = warehouseClient.updateAnnotationCallable().futureCall(request);
   // Do something.
   Annotation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateAnnotationRequest,Annotation>

updateAsset(Asset asset, FieldMask updateMask)

public final Asset updateAsset(Asset asset, FieldMask updateMask)

Updates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   Asset asset = Asset.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Asset response = warehouseClient.updateAsset(asset, updateMask);
 }
 
Parameters
Name Description
asset Asset

Required. The asset to update.

The asset's name field is used to identify the asset to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

updateMask FieldMask

The list of fields to be updated.

Returns
Type Description
Asset

updateAsset(UpdateAssetRequest request)

public final Asset updateAsset(UpdateAssetRequest request)

Updates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateAssetRequest request =
       UpdateAssetRequest.newBuilder()
           .setAsset(Asset.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Asset response = warehouseClient.updateAsset(request);
 }
 
Parameter
Name Description
request UpdateAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Asset

updateAssetCallable()

public final UnaryCallable<UpdateAssetRequest,Asset> updateAssetCallable()

Updates an asset inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateAssetRequest request =
       UpdateAssetRequest.newBuilder()
           .setAsset(Asset.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Asset> future = warehouseClient.updateAssetCallable().futureCall(request);
   // Do something.
   Asset response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateAssetRequest,Asset>

updateCollection(Collection collection, FieldMask updateMask)

public final Collection updateCollection(Collection collection, FieldMask updateMask)

Updates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   Collection collection = Collection.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Collection response = warehouseClient.updateCollection(collection, updateMask);
 }
 
Parameters
Name Description
collection Collection

Required. The collection to update.

The collection's name field is used to identify the collection to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

updateMask FieldMask

The list of fields to be updated. - Unset update_mask or set update_mask to be a single "*" only will update all updatable fields with the value provided in collection. - To update display_name value to empty string, set it in the collection to empty string, and set update_mask with "display_name". Same applies to other updatable string fields in the collection.

Returns
Type Description
Collection

updateCollection(UpdateCollectionRequest request)

public final Collection updateCollection(UpdateCollectionRequest request)

Updates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateCollectionRequest request =
       UpdateCollectionRequest.newBuilder()
           .setCollection(Collection.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Collection response = warehouseClient.updateCollection(request);
 }
 
Parameter
Name Description
request UpdateCollectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Collection

updateCollectionCallable()

public final UnaryCallable<UpdateCollectionRequest,Collection> updateCollectionCallable()

Updates a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateCollectionRequest request =
       UpdateCollectionRequest.newBuilder()
           .setCollection(Collection.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Collection> future = warehouseClient.updateCollectionCallable().futureCall(request);
   // Do something.
   Collection response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateCollectionRequest,Collection>

updateCorpus(Corpus corpus, FieldMask updateMask)

public final Corpus updateCorpus(Corpus corpus, FieldMask updateMask)

Updates a corpus in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   Corpus corpus = Corpus.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Corpus response = warehouseClient.updateCorpus(corpus, updateMask);
 }
 
Parameters
Name Description
corpus Corpus

Required. The corpus which replaces the resource on the server.

updateMask FieldMask

The list of fields to be updated.

Returns
Type Description
Corpus

updateCorpus(UpdateCorpusRequest request)

public final Corpus updateCorpus(UpdateCorpusRequest request)

Updates a corpus in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateCorpusRequest request =
       UpdateCorpusRequest.newBuilder()
           .setCorpus(Corpus.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Corpus response = warehouseClient.updateCorpus(request);
 }
 
Parameter
Name Description
request UpdateCorpusRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Corpus

updateCorpusCallable()

public final UnaryCallable<UpdateCorpusRequest,Corpus> updateCorpusCallable()

Updates a corpus in a project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateCorpusRequest request =
       UpdateCorpusRequest.newBuilder()
           .setCorpus(Corpus.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Corpus> future = warehouseClient.updateCorpusCallable().futureCall(request);
   // Do something.
   Corpus response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateCorpusRequest,Corpus>

updateDataSchema(DataSchema dataSchema, FieldMask updateMask)

public final DataSchema updateDataSchema(DataSchema dataSchema, FieldMask updateMask)

Updates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   DataSchema dataSchema = DataSchema.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   DataSchema response = warehouseClient.updateDataSchema(dataSchema, updateMask);
 }
 
Parameters
Name Description
dataSchema DataSchema

Required. The data schema's name field is used to identify the data schema to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}

updateMask FieldMask

The list of fields to be updated.

Returns
Type Description
DataSchema

updateDataSchema(UpdateDataSchemaRequest request)

public final DataSchema updateDataSchema(UpdateDataSchemaRequest request)

Updates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateDataSchemaRequest request =
       UpdateDataSchemaRequest.newBuilder()
           .setDataSchema(DataSchema.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   DataSchema response = warehouseClient.updateDataSchema(request);
 }
 
Parameter
Name Description
request UpdateDataSchemaRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DataSchema

updateDataSchemaCallable()

public final UnaryCallable<UpdateDataSchemaRequest,DataSchema> updateDataSchemaCallable()

Updates data schema inside corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateDataSchemaRequest request =
       UpdateDataSchemaRequest.newBuilder()
           .setDataSchema(DataSchema.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<DataSchema> future = warehouseClient.updateDataSchemaCallable().futureCall(request);
   // Do something.
   DataSchema response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateDataSchemaRequest,DataSchema>

updateIndexAsync(Index index, FieldMask updateMask)

public final OperationFuture<Index,UpdateIndexMetadata> updateIndexAsync(Index index, FieldMask updateMask)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   Index index = Index.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Index response = warehouseClient.updateIndexAsync(index, updateMask).get();
 }
 
Parameters
Name Description
index Index

Required. The resource being updated.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Index,UpdateIndexMetadata>

updateIndexAsync(UpdateIndexRequest request)

public final OperationFuture<Index,UpdateIndexMetadata> updateIndexAsync(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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexRequest request =
       UpdateIndexRequest.newBuilder()
           .setIndex(Index.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Index response = warehouseClient.updateIndexAsync(request).get();
 }
 
Parameter
Name Description
request UpdateIndexRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Index,UpdateIndexMetadata>

updateIndexCallable()

public final UnaryCallable<UpdateIndexRequest,Operation> updateIndexCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexRequest request =
       UpdateIndexRequest.newBuilder()
           .setIndex(Index.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future = warehouseClient.updateIndexCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateIndexRequest,Operation>

updateIndexEndpointAsync(IndexEndpoint indexEndpoint, FieldMask updateMask)

public final OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointAsync(IndexEndpoint indexEndpoint, FieldMask updateMask)

Updates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   IndexEndpoint response =
       warehouseClient.updateIndexEndpointAsync(indexEndpoint, updateMask).get();
 }
 
Parameters
Name Description
indexEndpoint IndexEndpoint

Required. The resource being updated.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata>

updateIndexEndpointAsync(UpdateIndexEndpointRequest request)

public final OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointAsync(UpdateIndexEndpointRequest request)

Updates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexEndpointRequest request =
       UpdateIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   IndexEndpoint response = warehouseClient.updateIndexEndpointAsync(request).get();
 }
 
Parameter
Name Description
request UpdateIndexEndpointRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata>

updateIndexEndpointCallable()

public final UnaryCallable<UpdateIndexEndpointRequest,Operation> updateIndexEndpointCallable()

Updates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexEndpointRequest request =
       UpdateIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       warehouseClient.updateIndexEndpointCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateIndexEndpointRequest,Operation>

updateIndexEndpointOperationCallable()

public final OperationCallable<UpdateIndexEndpointRequest,IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointOperationCallable()

Updates an IndexEndpoint.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexEndpointRequest request =
       UpdateIndexEndpointRequest.newBuilder()
           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<IndexEndpoint, UpdateIndexEndpointMetadata> future =
       warehouseClient.updateIndexEndpointOperationCallable().futureCall(request);
   // Do something.
   IndexEndpoint response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateIndexEndpointRequest,IndexEndpoint,UpdateIndexEndpointMetadata>

updateIndexOperationCallable()

public final OperationCallable<UpdateIndexRequest,Index,UpdateIndexMetadata> updateIndexOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateIndexRequest request =
       UpdateIndexRequest.newBuilder()
           .setIndex(Index.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<Index, UpdateIndexMetadata> future =
       warehouseClient.updateIndexOperationCallable().futureCall(request);
   // Do something.
   Index response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateIndexRequest,Index,UpdateIndexMetadata>

updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask)

public final SearchConfig updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchConfig searchConfig = SearchConfig.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   SearchConfig response = warehouseClient.updateSearchConfig(searchConfig, updateMask);
 }
 
Parameters
Name Description
searchConfig SearchConfig

Required. The search configuration to update.

The search configuration's name field is used to identify the resource to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

updateMask FieldMask

The list of fields to be updated. If left unset, all field paths will be updated/overwritten.

Returns
Type Description
SearchConfig

updateSearchConfig(UpdateSearchConfigRequest request)

public final 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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateSearchConfigRequest request =
       UpdateSearchConfigRequest.newBuilder()
           .setSearchConfig(SearchConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   SearchConfig response = warehouseClient.updateSearchConfig(request);
 }
 
Parameter
Name Description
request UpdateSearchConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchConfig

updateSearchConfigCallable()

public final UnaryCallable<UpdateSearchConfigRequest,SearchConfig> updateSearchConfigCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateSearchConfigRequest request =
       UpdateSearchConfigRequest.newBuilder()
           .setSearchConfig(SearchConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<SearchConfig> future =
       warehouseClient.updateSearchConfigCallable().futureCall(request);
   // Do something.
   SearchConfig response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateSearchConfigRequest,SearchConfig>

updateSearchHypernym(SearchHypernym searchHypernym, FieldMask updateMask)

public final SearchHypernym updateSearchHypernym(SearchHypernym searchHypernym, FieldMask updateMask)

Updates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   SearchHypernym response = warehouseClient.updateSearchHypernym(searchHypernym, updateMask);
 }
 
Parameters
Name Description
searchHypernym SearchHypernym

Required. The SearchHypernym to update. The search hypernym's name field is used to identify the search hypernym to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

updateMask FieldMask

The list of fields to be updated. If left unset, all field paths will be updated/overwritten.

Returns
Type Description
SearchHypernym

updateSearchHypernym(UpdateSearchHypernymRequest request)

public final SearchHypernym updateSearchHypernym(UpdateSearchHypernymRequest request)

Updates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateSearchHypernymRequest request =
       UpdateSearchHypernymRequest.newBuilder()
           .setSearchHypernym(SearchHypernym.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   SearchHypernym response = warehouseClient.updateSearchHypernym(request);
 }
 
Parameter
Name Description
request UpdateSearchHypernymRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SearchHypernym

updateSearchHypernymCallable()

public final UnaryCallable<UpdateSearchHypernymRequest,SearchHypernym> updateSearchHypernymCallable()

Updates a SearchHypernym inside a corpus.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UpdateSearchHypernymRequest request =
       UpdateSearchHypernymRequest.newBuilder()
           .setSearchHypernym(SearchHypernym.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<SearchHypernym> future =
       warehouseClient.updateSearchHypernymCallable().futureCall(request);
   // Do something.
   SearchHypernym response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateSearchHypernymRequest,SearchHypernym>

uploadAssetAsync(UploadAssetRequest request)

public final OperationFuture<UploadAssetResponse,UploadAssetMetadata> uploadAssetAsync(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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UploadAssetRequest request =
       UploadAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setAssetSource(AssetSource.newBuilder().build())
           .build();
   UploadAssetResponse response = warehouseClient.uploadAssetAsync(request).get();
 }
 
Parameter
Name Description
request UploadAssetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<UploadAssetResponse,UploadAssetMetadata>

uploadAssetCallable()

public final UnaryCallable<UploadAssetRequest,Operation> uploadAssetCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UploadAssetRequest request =
       UploadAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setAssetSource(AssetSource.newBuilder().build())
           .build();
   ApiFuture<Operation> future = warehouseClient.uploadAssetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UploadAssetRequest,Operation>

uploadAssetOperationCallable()

public final OperationCallable<UploadAssetRequest,UploadAssetResponse,UploadAssetMetadata> uploadAssetOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   UploadAssetRequest request =
       UploadAssetRequest.newBuilder()
           .setName(
               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
           .setAssetSource(AssetSource.newBuilder().build())
           .build();
   OperationFuture<UploadAssetResponse, UploadAssetMetadata> future =
       warehouseClient.uploadAssetOperationCallable().futureCall(request);
   // Do something.
   UploadAssetResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<UploadAssetRequest,UploadAssetResponse,UploadAssetMetadata>

viewCollectionItems(CollectionName collection)

public final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(CollectionName collection)

View items inside a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   CollectionName collection =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
   for (CollectionItem element : warehouseClient.viewCollectionItems(collection).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
collection CollectionName

Required. The collection to view. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
WarehouseClient.ViewCollectionItemsPagedResponse

viewCollectionItems(ViewCollectionItemsRequest request)

public final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(ViewCollectionItemsRequest request)

View items inside a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewCollectionItemsRequest request =
       ViewCollectionItemsRequest.newBuilder()
           .setCollection(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (CollectionItem element : warehouseClient.viewCollectionItems(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ViewCollectionItemsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ViewCollectionItemsPagedResponse

viewCollectionItems(String collection)

public final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(String collection)

View items inside a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String collection =
       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
           .toString();
   for (CollectionItem element : warehouseClient.viewCollectionItems(collection).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
collection String

Required. The collection to view. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

Returns
Type Description
WarehouseClient.ViewCollectionItemsPagedResponse

viewCollectionItemsCallable()

public final UnaryCallable<ViewCollectionItemsRequest,ViewCollectionItemsResponse> viewCollectionItemsCallable()

View items inside a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewCollectionItemsRequest request =
       ViewCollectionItemsRequest.newBuilder()
           .setCollection(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ViewCollectionItemsResponse response =
         warehouseClient.viewCollectionItemsCallable().call(request);
     for (CollectionItem element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ViewCollectionItemsRequest,ViewCollectionItemsResponse>

viewCollectionItemsPagedCallable()

public final UnaryCallable<ViewCollectionItemsRequest,WarehouseClient.ViewCollectionItemsPagedResponse> viewCollectionItemsPagedCallable()

View items inside a collection.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewCollectionItemsRequest request =
       ViewCollectionItemsRequest.newBuilder()
           .setCollection(
               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<CollectionItem> future =
       warehouseClient.viewCollectionItemsPagedCallable().futureCall(request);
   // Do something.
   for (CollectionItem element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ViewCollectionItemsRequest,ViewCollectionItemsPagedResponse>

viewIndexedAssets(IndexName index)

public final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(IndexName index)

Lists assets inside an index.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
   for (IndexedAsset element : warehouseClient.viewIndexedAssets(index).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
index IndexName

Required. The index that owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
WarehouseClient.ViewIndexedAssetsPagedResponse

viewIndexedAssets(ViewIndexedAssetsRequest request)

public final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(ViewIndexedAssetsRequest request)

Lists assets inside an index.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewIndexedAssetsRequest request =
       ViewIndexedAssetsRequest.newBuilder()
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (IndexedAsset element : warehouseClient.viewIndexedAssets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ViewIndexedAssetsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WarehouseClient.ViewIndexedAssetsPagedResponse

viewIndexedAssets(String index)

public final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(String index)

Lists assets inside an index.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   String index =
       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
   for (IndexedAsset element : warehouseClient.viewIndexedAssets(index).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
index String

Required. The index that owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

Returns
Type Description
WarehouseClient.ViewIndexedAssetsPagedResponse

viewIndexedAssetsCallable()

public final UnaryCallable<ViewIndexedAssetsRequest,ViewIndexedAssetsResponse> viewIndexedAssetsCallable()

Lists assets inside an index.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewIndexedAssetsRequest request =
       ViewIndexedAssetsRequest.newBuilder()
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ViewIndexedAssetsResponse response =
         warehouseClient.viewIndexedAssetsCallable().call(request);
     for (IndexedAsset element : response.getIndexedAssetsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ViewIndexedAssetsRequest,ViewIndexedAssetsResponse>

viewIndexedAssetsPagedCallable()

public final UnaryCallable<ViewIndexedAssetsRequest,WarehouseClient.ViewIndexedAssetsPagedResponse> viewIndexedAssetsPagedCallable()

Lists assets inside an index.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (WarehouseClient warehouseClient = WarehouseClient.create()) {
   ViewIndexedAssetsRequest request =
       ViewIndexedAssetsRequest.newBuilder()
           .setIndex(
               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<IndexedAsset> future =
       warehouseClient.viewIndexedAssetsPagedCallable().futureCall(request);
   // Do something.
   for (IndexedAsset element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ViewIndexedAssetsRequest,ViewIndexedAssetsPagedResponse>