Class WarehouseClient

java.lang.Object
com.google.cloud.visionai.v1.WarehouseClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class WarehouseClient extends Object implements BackgroundResource
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()

ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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.

  • Constructor Details

    • WarehouseClient

      protected WarehouseClient(WarehouseSettings settings) throws IOException
      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.
      Throws:
      IOException
    • WarehouseClient

      protected WarehouseClient(WarehouseStub stub)
  • Method Details

    • create

      public static final WarehouseClient create() throws IOException
      Constructs an instance of WarehouseClient with default settings.
      Throws:
      IOException
    • create

      public static final WarehouseClient create(WarehouseSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      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).
    • getSettings

      public final WarehouseSettings getSettings()
    • getStub

      public WarehouseStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • createAsset

      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:
      parent - Required. The parent resource where this asset will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      asset - Required. The asset to create.
      assetId - Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createAsset

      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:
      parent - Required. The parent resource where this asset will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      asset - Required. The asset to create.
      assetId - Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createAsset

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateAsset

      public final Asset updateAsset(Asset asset, com.google.protobuf.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:
      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 - The list of fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateAsset

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getAsset

      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);
       }
       
      Parameters:
      name - Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
      Throws:
      ApiException - if the remote call fails
    • getAsset

      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);
       }
       
      Parameters:
      name - Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
      Throws:
      ApiException - if the remote call fails
    • getAsset

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listAssets

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of assets. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listAssets

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of assets. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listAssets

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the asset to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
      Throws:
      ApiException - if the remote call fails
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the asset to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
      Throws:
      ApiException - if the remote call fails
    • deleteAssetAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteAssetOperationCallable

      public final OperationCallable<DeleteAssetRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • uploadAssetAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • generateRetrievalUrl

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • analyzeAssetAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • indexAssetAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • removeIndexAssetAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • viewIndexedAssets

      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);
         }
       }
       
      Parameters:
      index - Required. The index that owns this collection of assets. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • viewIndexedAssets

      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);
         }
       }
       
      Parameters:
      index - Required. The index that owns this collection of assets. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • viewIndexedAssets

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createIndexAsync

      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:
      parent - 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 - Required. The index being created.
      indexId - Optional. The ID for the index. This will become the final resource name for the index. If the user does not specify this value, it will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createIndexAsync

      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:
      parent - 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 - Required. The index being created.
      indexId - Optional. The ID for the index. This will become the final resource name for the index. If the user does not specify this value, it will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createIndexAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • updateIndexAsync

      public final OperationFuture<Index,UpdateIndexMetadata> updateIndexAsync(Index index, com.google.protobuf.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:
      index - Required. The resource being updated.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateIndexAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getIndex

      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);
       }
       
      Parameters:
      name - Required. Name of the Index resource. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • getIndex

      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);
       }
       
      Parameters:
      name - Required. Name of the Index resource. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • getIndex

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listIndexes

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent corpus that owns this collection of indexes. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listIndexes

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent corpus that owns this collection of indexes. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listIndexes

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • deleteIndexAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the index to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • deleteIndexAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the index to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
      Throws:
      ApiException - if the remote call fails
    • deleteIndexAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteIndexOperationCallable

      public final OperationCallable<DeleteIndexRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • createCorpusAsync

      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:
      parent - Required. Form: `projects/{project_number}/locations/{location_id}`
      corpus - Required. The corpus to be created.
      Throws:
      ApiException - if the remote call fails
    • createCorpusAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getCorpus

      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);
       }
       
      Parameters:
      name - Required. The resource name of the corpus to retrieve.
      Throws:
      ApiException - if the remote call fails
    • getCorpus

      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);
       }
       
      Parameters:
      name - Required. The resource name of the corpus to retrieve.
      Throws:
      ApiException - if the remote call fails
    • getCorpus

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateCorpus

      public final Corpus updateCorpus(Corpus corpus, com.google.protobuf.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:
      corpus - Required. The corpus which replaces the resource on the server.
      updateMask - The list of fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateCorpus

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listCorpora

      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);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the project from which to list corpora.
      Throws:
      ApiException - if the remote call fails
    • listCorpora

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • deleteCorpus

      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);
       }
       
      Parameters:
      name - Required. The resource name of the corpus to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteCorpus

      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);
       }
       
      Parameters:
      name - Required. The resource name of the corpus to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteCorpus

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCorpusCallable

      public final UnaryCallable<DeleteCorpusRequest,com.google.protobuf.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();
       }
       
    • analyzeCorpusAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • createDataSchema

      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:
      parent - Required. The parent resource where this data schema will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      dataSchema - Required. The data schema to create.
      Throws:
      ApiException - if the remote call fails
    • createDataSchema

      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:
      parent - Required. The parent resource where this data schema will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      dataSchema - Required. The data schema to create.
      Throws:
      ApiException - if the remote call fails
    • createDataSchema

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateDataSchema

      public final DataSchema updateDataSchema(DataSchema dataSchema, com.google.protobuf.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:
      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 - The list of fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateDataSchema

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getDataSchema

      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);
       }
       
      Parameters:
      name - Required. The name of the data schema to retrieve. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
      Throws:
      ApiException - if the remote call fails
    • getDataSchema

      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);
       }
       
      Parameters:
      name - Required. The name of the data schema to retrieve. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
      Throws:
      ApiException - if the remote call fails
    • getDataSchema

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteDataSchema

      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);
       }
       
      Parameters:
      name - Required. The name of the data schema to delete. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteDataSchema

      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);
       }
       
      Parameters:
      name - Required. The name of the data schema to delete. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteDataSchema

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDataSchemaCallable

      public final UnaryCallable<DeleteDataSchemaRequest,com.google.protobuf.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();
       }
       
    • listDataSchemas

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of data schemas. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      Throws:
      ApiException - if the remote call fails
    • listDataSchemas

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of data schemas. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      Throws:
      ApiException - if the remote call fails
    • listDataSchemas

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createAnnotation

      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:
      parent - Required. The parent resource where this annotation will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
      annotation - Required. The annotation to create.
      annotationId - Optional. The ID to use for the annotation, which will become the final component of the annotation's resource name if user choose to specify. Otherwise, annotation id will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createAnnotation

      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:
      parent - Required. The parent resource where this annotation will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
      annotation - Required. The annotation to create.
      annotationId - Optional. The ID to use for the annotation, which will become the final component of the annotation's resource name if user choose to specify. Otherwise, annotation id will be generated by system.

      This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createAnnotation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getAnnotation

      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);
       }
       
      Parameters:
      name - Required. The name of the annotation to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
      Throws:
      ApiException - if the remote call fails
    • getAnnotation

      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);
       }
       
      Parameters:
      name - Required. The name of the annotation to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
      Throws:
      ApiException - if the remote call fails
    • getAnnotation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listAnnotations

      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);
         }
       }
       
      Parameters:
      parent - The parent, which owns this collection of annotations. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
      Throws:
      ApiException - if the remote call fails
    • listAnnotations

      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);
         }
       }
       
      Parameters:
      parent - The parent, which owns this collection of annotations. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
      Throws:
      ApiException - if the remote call fails
    • listAnnotations

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • updateAnnotation

      public final Annotation updateAnnotation(Annotation annotation, com.google.protobuf.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:
      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 - The list of fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateAnnotation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteAnnotation

      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);
       }
       
      Parameters:
      name - Required. The name of the annotation to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
      Throws:
      ApiException - if the remote call fails
    • deleteAnnotation

      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);
       }
       
      Parameters:
      name - Required. The name of the annotation to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
      Throws:
      ApiException - if the remote call fails
    • deleteAnnotation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteAnnotationCallable

      public final UnaryCallable<DeleteAnnotationRequest,com.google.protobuf.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();
       }
       
    • 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.
         }
       }
       
    • clipAsset

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • generateHlsUri

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • importAssetsAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • createSearchConfig

      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:
      parent - Required. The parent resource where this search configuration will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      searchConfig - Required. The search config to create.
      searchConfigId - Required. ID to use for the new search config. Will become the final component of the SearchConfig's resource name. This value should be up to 63 characters, and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last could be a letter or a number.
      Throws:
      ApiException - if the remote call fails
    • createSearchConfig

      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:
      parent - Required. The parent resource where this search configuration will be created. Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
      searchConfig - Required. The search config to create.
      searchConfigId - Required. ID to use for the new search config. Will become the final component of the SearchConfig's resource name. This value should be up to 63 characters, and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last could be a letter or a number.
      Throws:
      ApiException - if the remote call fails
    • createSearchConfig

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateSearchConfig

      public final SearchConfig updateSearchConfig(SearchConfig searchConfig, com.google.protobuf.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:
      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 - The list of fields to be updated. If left unset, all field paths will be updated/overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateSearchConfig

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getSearchConfig

      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);
       }
       
      Parameters:
      name - Required. The name of the search configuration to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
      Throws:
      ApiException - if the remote call fails
    • getSearchConfig

      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);
       }
       
      Parameters:
      name - Required. The name of the search configuration to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
      Throws:
      ApiException - if the remote call fails
    • getSearchConfig

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteSearchConfig

      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);
       }
       
      Parameters:
      name - Required. The name of the search configuration to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
      Throws:
      ApiException - if the remote call fails
    • deleteSearchConfig

      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);
       }
       
      Parameters:
      name - Required. The name of the search configuration to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
      Throws:
      ApiException - if the remote call fails
    • deleteSearchConfig

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSearchConfigCallable

      public final UnaryCallable<DeleteSearchConfigRequest,com.google.protobuf.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();
       }
       
    • listSearchConfigs

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of search configurations. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listSearchConfigs

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of search configurations. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listSearchConfigs

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createSearchHypernym

      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:
      parent - Required. The parent resource where this SearchHypernym will be created. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      searchHypernym - Required. The SearchHypernym to create.
      searchHypernymId - Optional. The search hypernym id. If omitted, a random UUID will be generated.
      Throws:
      ApiException - if the remote call fails
    • createSearchHypernym

      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:
      parent - Required. The parent resource where this SearchHypernym will be created. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      searchHypernym - Required. The SearchHypernym to create.
      searchHypernymId - Optional. The search hypernym id. If omitted, a random UUID will be generated.
      Throws:
      ApiException - if the remote call fails
    • createSearchHypernym

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateSearchHypernym

      public final SearchHypernym updateSearchHypernym(SearchHypernym searchHypernym, com.google.protobuf.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:
      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 - The list of fields to be updated. If left unset, all field paths will be updated/overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateSearchHypernym

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getSearchHypernym

      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);
       }
       
      Parameters:
      name - Required. The name of the SearchHypernym to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
      Throws:
      ApiException - if the remote call fails
    • getSearchHypernym

      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);
       }
       
      Parameters:
      name - Required. The name of the SearchHypernym to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
      Throws:
      ApiException - if the remote call fails
    • getSearchHypernym

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteSearchHypernym

      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);
       }
       
      Parameters:
      name - Required. The name of the SearchHypernym to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
      Throws:
      ApiException - if the remote call fails
    • deleteSearchHypernym

      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);
       }
       
      Parameters:
      name - Required. The name of the SearchHypernym to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
      Throws:
      ApiException - if the remote call fails
    • deleteSearchHypernym

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSearchHypernymCallable

      public final UnaryCallable<DeleteSearchHypernymRequest,com.google.protobuf.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();
       }
       
    • listSearchHypernyms

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of SearchHypernyms. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listSearchHypernyms

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns this collection of SearchHypernyms. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listSearchHypernyms

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • searchAssets

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • searchIndexEndpoint

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createIndexEndpointAsync

      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:
      parent - Required. Format: `projects/{project}/locations/{location}`
      indexEndpoint - Required. The resource being created.
      indexEndpointId - 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.

      Throws:
      ApiException - if the remote call fails
    • createIndexEndpointAsync

      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:
      parent - Required. Format: `projects/{project}/locations/{location}`
      indexEndpoint - Required. The resource being created.
      indexEndpointId - 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.

      Throws:
      ApiException - if the remote call fails
    • createIndexEndpointAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getIndexEndpoint

      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);
       }
       
      Parameters:
      name - Required. Name of the IndexEndpoint resource.
      Throws:
      ApiException - if the remote call fails
    • getIndexEndpoint

      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);
       }
       
      Parameters:
      name - Required. Name of the IndexEndpoint resource.
      Throws:
      ApiException - if the remote call fails
    • getIndexEndpoint

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listIndexEndpoints

      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);
         }
       }
       
      Parameters:
      parent - Required. Format: `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listIndexEndpoints

      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);
         }
       }
       
      Parameters:
      parent - Required. Format: `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listIndexEndpoints

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • updateIndexEndpointAsync

      public final OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointAsync(IndexEndpoint indexEndpoint, com.google.protobuf.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:
      indexEndpoint - Required. The resource being updated.
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateIndexEndpointAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteIndexEndpointAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteIndexEndpointAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteIndexEndpointAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteIndexEndpointOperationCallable

      public final OperationCallable<DeleteIndexEndpointRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • deployIndexAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • undeployIndexAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • createCollectionAsync

      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:
      parent - Required. The parent resource where this collection will be created. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      collection - Required. The collection resource to be created.
      collectionId - Optional. The ID to use for the collection, which will become the final component of the resource name if user choose to specify. Otherwise, collection id will be generated by system.

      This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createCollectionAsync

      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:
      parent - Required. The parent resource where this collection will be created. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      collection - Required. The collection resource to be created.
      collectionId - Optional. The ID to use for the collection, which will become the final component of the resource name if user choose to specify. Otherwise, collection id will be generated by system.

      This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

      Throws:
      ApiException - if the remote call fails
    • createCollectionAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteCollectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the collection to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • deleteCollectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. The name of the collection to delete. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • deleteCollectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCollectionOperationCallable

      public final OperationCallable<DeleteCollectionRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • getCollection

      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);
       }
       
      Parameters:
      name - Required. The name of the collection to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • getCollection

      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);
       }
       
      Parameters:
      name - Required. The name of the collection to retrieve. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • getCollection

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateCollection

      public final Collection updateCollection(Collection collection, com.google.protobuf.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:
      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 - 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`.
      Throws:
      ApiException - if the remote call fails
    • updateCollection

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listCollections

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent corpus. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listCollections

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent corpus. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
      Throws:
      ApiException - if the remote call fails
    • listCollections

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • addCollectionItem

      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);
       }
       
      Parameters:
      item - Required. The item to be added.
      Throws:
      ApiException - if the remote call fails
    • addCollectionItem

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • removeCollectionItem

      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);
       }
       
      Parameters:
      item - Required. The item to be removed.
      Throws:
      ApiException - if the remote call fails
    • removeCollectionItem

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • viewCollectionItems

      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);
         }
       }
       
      Parameters:
      collection - Required. The collection to view. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • viewCollectionItems

      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);
         }
       }
       
      Parameters:
      collection - Required. The collection to view. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
      Throws:
      ApiException - if the remote call fails
    • viewCollectionItems

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      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()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : warehouseClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      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()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future = warehouseClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      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()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response = warehouseClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      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()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = warehouseClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      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()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future = warehouseClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException