@Generated(value="by gapic-generator-java") public class WarehouseClient extends Object implements com.google.api.gax.core.BackgroundResource
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAsset |
Updates an asset inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAsset |
Reads an asset inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAsset |
Deletes asset inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ViewIndexedAssets |
Lists assets inside an index. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AnalyzeCorpus |
Analyzes a corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDataSchema |
Creates data schema inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDataSchema |
Updates data schema inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataSchema |
Gets data schema inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDataSchema |
Deletes data schema inside corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAnnotation |
Creates annotation inside asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAnnotation |
Reads annotation inside asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAnnotation |
Updates annotation inside asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAnnotation |
Deletes annotation inside asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSearchHypernyms |
Lists SearchHypernyms inside a corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SearchAssets |
Search media asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateIndexEndpoint |
Creates an IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIndexEndpoint |
Gets an IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateIndexEndpoint |
Updates an IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteIndexEndpoint |
Deletes an IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeployIndex |
Deploys an Index to IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UndeployIndex |
Undeploys an Index from IndexEndpoint. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateCollection |
Creates a collection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteCollection |
Deletes a collection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetCollection |
Gets a collection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateCollection |
Updates a collection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListCollections |
Lists collections inside a corpus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ViewCollectionItems |
View items inside a collection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
| Modifier | Constructor and Description |
|---|---|
protected |
WarehouseClient(WarehouseSettings settings)
Constructs an instance of WarehouseClient, using the given settings.
|
protected |
WarehouseClient(WarehouseStub stub) |
| Modifier and Type | Method and Description |
|---|---|
AddCollectionItemResponse |
addCollectionItem(AddCollectionItemRequest request)
Adds an item into a Collection.
|
AddCollectionItemResponse |
addCollectionItem(CollectionItem item)
Adds an item into a Collection.
|
com.google.api.gax.rpc.UnaryCallable<AddCollectionItemRequest,AddCollectionItemResponse> |
addCollectionItemCallable()
Adds an item into a Collection.
|
com.google.api.gax.longrunning.OperationFuture<AnalyzeAssetResponse,AnalyzeAssetMetadata> |
analyzeAssetAsync(AnalyzeAssetRequest request)
Analyze asset to power search capability.
|
com.google.api.gax.rpc.UnaryCallable<AnalyzeAssetRequest,com.google.longrunning.Operation> |
analyzeAssetCallable()
Analyze asset to power search capability.
|
com.google.api.gax.rpc.OperationCallable<AnalyzeAssetRequest,AnalyzeAssetResponse,AnalyzeAssetMetadata> |
analyzeAssetOperationCallable()
Analyze asset to power search capability.
|
com.google.api.gax.longrunning.OperationFuture<AnalyzeCorpusResponse,AnalyzeCorpusMetadata> |
analyzeCorpusAsync(AnalyzeCorpusRequest request)
Analyzes a corpus.
|
com.google.api.gax.rpc.UnaryCallable<AnalyzeCorpusRequest,com.google.longrunning.Operation> |
analyzeCorpusCallable()
Analyzes a corpus.
|
com.google.api.gax.rpc.OperationCallable<AnalyzeCorpusRequest,AnalyzeCorpusResponse,AnalyzeCorpusMetadata> |
analyzeCorpusOperationCallable()
Analyzes a corpus.
|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
ClipAssetResponse |
clipAsset(ClipAssetRequest request)
Supported by STREAM_VIDEO corpus type.
|
com.google.api.gax.rpc.UnaryCallable<ClipAssetRequest,ClipAssetResponse> |
clipAssetCallable()
Supported by STREAM_VIDEO corpus type.
|
void |
close() |
static WarehouseClient |
create()
Constructs an instance of WarehouseClient with default settings.
|
static WarehouseClient |
create(WarehouseSettings settings)
Constructs an instance of WarehouseClient, using the given settings.
|
static WarehouseClient |
create(WarehouseStub stub)
Constructs an instance of WarehouseClient, using the given stub for making calls.
|
Annotation |
createAnnotation(AssetName parent,
Annotation annotation,
String annotationId)
Creates annotation inside asset.
|
Annotation |
createAnnotation(CreateAnnotationRequest request)
Creates annotation inside asset.
|
Annotation |
createAnnotation(String parent,
Annotation annotation,
String annotationId)
Creates annotation inside asset.
|
com.google.api.gax.rpc.UnaryCallable<CreateAnnotationRequest,Annotation> |
createAnnotationCallable()
Creates annotation inside asset.
|
Asset |
createAsset(CorpusName parent,
Asset asset,
String assetId)
Creates an asset inside corpus.
|
Asset |
createAsset(CreateAssetRequest request)
Creates an asset inside corpus.
|
Asset |
createAsset(String parent,
Asset asset,
String assetId)
Creates an asset inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<CreateAssetRequest,Asset> |
createAssetCallable()
Creates an asset inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> |
createCollectionAsync(CorpusName parent,
Collection collection,
String collectionId)
Creates a collection.
|
com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> |
createCollectionAsync(CreateCollectionRequest request)
Creates a collection.
|
com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> |
createCollectionAsync(String parent,
Collection collection,
String collectionId)
Creates a collection.
|
com.google.api.gax.rpc.UnaryCallable<CreateCollectionRequest,com.google.longrunning.Operation> |
createCollectionCallable()
Creates a collection.
|
com.google.api.gax.rpc.OperationCallable<CreateCollectionRequest,Collection,CreateCollectionMetadata> |
createCollectionOperationCallable()
Creates a collection.
|
com.google.api.gax.longrunning.OperationFuture<Corpus,CreateCorpusMetadata> |
createCorpusAsync(CreateCorpusRequest request)
Creates a corpus inside a project.
|
com.google.api.gax.longrunning.OperationFuture<Corpus,CreateCorpusMetadata> |
createCorpusAsync(String parent,
Corpus corpus)
Creates a corpus inside a project.
|
com.google.api.gax.rpc.UnaryCallable<CreateCorpusRequest,com.google.longrunning.Operation> |
createCorpusCallable()
Creates a corpus inside a project.
|
com.google.api.gax.rpc.OperationCallable<CreateCorpusRequest,Corpus,CreateCorpusMetadata> |
createCorpusOperationCallable()
Creates a corpus inside a project.
|
DataSchema |
createDataSchema(CorpusName parent,
DataSchema dataSchema)
Creates data schema inside corpus.
|
DataSchema |
createDataSchema(CreateDataSchemaRequest request)
Creates data schema inside corpus.
|
DataSchema |
createDataSchema(String parent,
DataSchema dataSchema)
Creates data schema inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<CreateDataSchemaRequest,DataSchema> |
createDataSchemaCallable()
Creates data schema inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> |
createIndexAsync(CorpusName parent,
Index index,
String indexId)
Creates an Index under the corpus.
|
com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> |
createIndexAsync(CreateIndexRequest request)
Creates an Index under the corpus.
|
com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> |
createIndexAsync(String parent,
Index index,
String indexId)
Creates an Index under the corpus.
|
com.google.api.gax.rpc.UnaryCallable<CreateIndexRequest,com.google.longrunning.Operation> |
createIndexCallable()
Creates an Index under the corpus.
|
com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> |
createIndexEndpointAsync(CreateIndexEndpointRequest request)
Creates an IndexEndpoint.
|
com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> |
createIndexEndpointAsync(LocationName parent,
IndexEndpoint indexEndpoint,
String indexEndpointId)
Creates an IndexEndpoint.
|
com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> |
createIndexEndpointAsync(String parent,
IndexEndpoint indexEndpoint,
String indexEndpointId)
Creates an IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<CreateIndexEndpointRequest,com.google.longrunning.Operation> |
createIndexEndpointCallable()
Creates an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<CreateIndexEndpointRequest,IndexEndpoint,CreateIndexEndpointMetadata> |
createIndexEndpointOperationCallable()
Creates an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<CreateIndexRequest,Index,CreateIndexMetadata> |
createIndexOperationCallable()
Creates an Index under the corpus.
|
SearchConfig |
createSearchConfig(CorpusName parent,
SearchConfig searchConfig,
String searchConfigId)
Creates a search configuration inside a corpus.
|
SearchConfig |
createSearchConfig(CreateSearchConfigRequest request)
Creates a search configuration inside a corpus.
|
SearchConfig |
createSearchConfig(String parent,
SearchConfig searchConfig,
String searchConfigId)
Creates a search configuration inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<CreateSearchConfigRequest,SearchConfig> |
createSearchConfigCallable()
Creates a search configuration inside a corpus.
|
SearchHypernym |
createSearchHypernym(CorpusName parent,
SearchHypernym searchHypernym,
String searchHypernymId)
Creates a SearchHypernym inside a corpus.
|
SearchHypernym |
createSearchHypernym(CreateSearchHypernymRequest request)
Creates a SearchHypernym inside a corpus.
|
SearchHypernym |
createSearchHypernym(String parent,
SearchHypernym searchHypernym,
String searchHypernymId)
Creates a SearchHypernym inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<CreateSearchHypernymRequest,SearchHypernym> |
createSearchHypernymCallable()
Creates a SearchHypernym inside a corpus.
|
void |
deleteAnnotation(AnnotationName name)
Deletes annotation inside asset.
|
void |
deleteAnnotation(DeleteAnnotationRequest request)
Deletes annotation inside asset.
|
void |
deleteAnnotation(String name)
Deletes annotation inside asset.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAnnotationRequest,com.google.protobuf.Empty> |
deleteAnnotationCallable()
Deletes annotation inside asset.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> |
deleteAssetAsync(AssetName name)
Deletes asset inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> |
deleteAssetAsync(DeleteAssetRequest request)
Deletes asset inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> |
deleteAssetAsync(String name)
Deletes asset inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAssetRequest,com.google.longrunning.Operation> |
deleteAssetCallable()
Deletes asset inside corpus.
|
com.google.api.gax.rpc.OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty,DeleteAssetMetadata> |
deleteAssetOperationCallable()
Deletes asset inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> |
deleteCollectionAsync(CollectionName name)
Deletes a collection.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> |
deleteCollectionAsync(DeleteCollectionRequest request)
Deletes a collection.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> |
deleteCollectionAsync(String name)
Deletes a collection.
|
com.google.api.gax.rpc.UnaryCallable<DeleteCollectionRequest,com.google.longrunning.Operation> |
deleteCollectionCallable()
Deletes a collection.
|
com.google.api.gax.rpc.OperationCallable<DeleteCollectionRequest,com.google.protobuf.Empty,DeleteCollectionMetadata> |
deleteCollectionOperationCallable()
Deletes a collection.
|
void |
deleteCorpus(CorpusName name)
Deletes a corpus only if its empty.
|
void |
deleteCorpus(DeleteCorpusRequest request)
Deletes a corpus only if its empty.
|
void |
deleteCorpus(String name)
Deletes a corpus only if its empty.
|
com.google.api.gax.rpc.UnaryCallable<DeleteCorpusRequest,com.google.protobuf.Empty> |
deleteCorpusCallable()
Deletes a corpus only if its empty.
|
void |
deleteDataSchema(DataSchemaName name)
Deletes data schema inside corpus.
|
void |
deleteDataSchema(DeleteDataSchemaRequest request)
Deletes data schema inside corpus.
|
void |
deleteDataSchema(String name)
Deletes data schema inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<DeleteDataSchemaRequest,com.google.protobuf.Empty> |
deleteDataSchemaCallable()
Deletes data schema inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> |
deleteIndexAsync(DeleteIndexRequest request)
Delete a single Index.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> |
deleteIndexAsync(IndexName name)
Delete a single Index.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> |
deleteIndexAsync(String name)
Delete a single Index.
|
com.google.api.gax.rpc.UnaryCallable<DeleteIndexRequest,com.google.longrunning.Operation> |
deleteIndexCallable()
Delete a single Index.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> |
deleteIndexEndpointAsync(DeleteIndexEndpointRequest request)
Deletes an IndexEndpoint.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> |
deleteIndexEndpointAsync(IndexEndpointName name)
Deletes an IndexEndpoint.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> |
deleteIndexEndpointAsync(String name)
Deletes an IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<DeleteIndexEndpointRequest,com.google.longrunning.Operation> |
deleteIndexEndpointCallable()
Deletes an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<DeleteIndexEndpointRequest,com.google.protobuf.Empty,DeleteIndexEndpointMetadata> |
deleteIndexEndpointOperationCallable()
Deletes an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<DeleteIndexRequest,com.google.protobuf.Empty,DeleteIndexMetadata> |
deleteIndexOperationCallable()
Delete a single Index.
|
void |
deleteSearchConfig(DeleteSearchConfigRequest request)
Deletes a search configuration inside a corpus.
|
void |
deleteSearchConfig(SearchConfigName name)
Deletes a search configuration inside a corpus.
|
void |
deleteSearchConfig(String name)
Deletes a search configuration inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSearchConfigRequest,com.google.protobuf.Empty> |
deleteSearchConfigCallable()
Deletes a search configuration inside a corpus.
|
void |
deleteSearchHypernym(DeleteSearchHypernymRequest request)
Deletes a SearchHypernym inside a corpus.
|
void |
deleteSearchHypernym(SearchHypernymName name)
Deletes a SearchHypernym inside a corpus.
|
void |
deleteSearchHypernym(String name)
Deletes a SearchHypernym inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSearchHypernymRequest,com.google.protobuf.Empty> |
deleteSearchHypernymCallable()
Deletes a SearchHypernym inside a corpus.
|
com.google.api.gax.longrunning.OperationFuture<DeployIndexResponse,DeployIndexMetadata> |
deployIndexAsync(DeployIndexRequest request)
Deploys an Index to IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<DeployIndexRequest,com.google.longrunning.Operation> |
deployIndexCallable()
Deploys an Index to IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<DeployIndexRequest,DeployIndexResponse,DeployIndexMetadata> |
deployIndexOperationCallable()
Deploys an Index to IndexEndpoint.
|
GenerateHlsUriResponse |
generateHlsUri(GenerateHlsUriRequest request)
Generates a uri for an HLS manifest.
|
com.google.api.gax.rpc.UnaryCallable<GenerateHlsUriRequest,GenerateHlsUriResponse> |
generateHlsUriCallable()
Generates a uri for an HLS manifest.
|
GenerateRetrievalUrlResponse |
generateRetrievalUrl(GenerateRetrievalUrlRequest request)
Generates a signed url for downloading the asset.
|
com.google.api.gax.rpc.UnaryCallable<GenerateRetrievalUrlRequest,GenerateRetrievalUrlResponse> |
generateRetrievalUrlCallable()
Generates a signed url for downloading the asset.
|
Annotation |
getAnnotation(AnnotationName name)
Reads annotation inside asset.
|
Annotation |
getAnnotation(GetAnnotationRequest request)
Reads annotation inside asset.
|
Annotation |
getAnnotation(String name)
Reads annotation inside asset.
|
com.google.api.gax.rpc.UnaryCallable<GetAnnotationRequest,Annotation> |
getAnnotationCallable()
Reads annotation inside asset.
|
Asset |
getAsset(AssetName name)
Reads an asset inside corpus.
|
Asset |
getAsset(GetAssetRequest request)
Reads an asset inside corpus.
|
Asset |
getAsset(String name)
Reads an asset inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<GetAssetRequest,Asset> |
getAssetCallable()
Reads an asset inside corpus.
|
Collection |
getCollection(CollectionName name)
Gets a collection.
|
Collection |
getCollection(GetCollectionRequest request)
Gets a collection.
|
Collection |
getCollection(String name)
Gets a collection.
|
com.google.api.gax.rpc.UnaryCallable<GetCollectionRequest,Collection> |
getCollectionCallable()
Gets a collection.
|
Corpus |
getCorpus(CorpusName name)
Gets corpus details inside a project.
|
Corpus |
getCorpus(GetCorpusRequest request)
Gets corpus details inside a project.
|
Corpus |
getCorpus(String name)
Gets corpus details inside a project.
|
com.google.api.gax.rpc.UnaryCallable<GetCorpusRequest,Corpus> |
getCorpusCallable()
Gets corpus details inside a project.
|
DataSchema |
getDataSchema(DataSchemaName name)
Gets data schema inside corpus.
|
DataSchema |
getDataSchema(GetDataSchemaRequest request)
Gets data schema inside corpus.
|
DataSchema |
getDataSchema(String name)
Gets data schema inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<GetDataSchemaRequest,DataSchema> |
getDataSchemaCallable()
Gets data schema inside corpus.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
Index |
getIndex(GetIndexRequest request)
Gets the details of a single Index under a Corpus.
|
Index |
getIndex(IndexName name)
Gets the details of a single Index under a Corpus.
|
Index |
getIndex(String name)
Gets the details of a single Index under a Corpus.
|
com.google.api.gax.rpc.UnaryCallable<GetIndexRequest,Index> |
getIndexCallable()
Gets the details of a single Index under a Corpus.
|
IndexEndpoint |
getIndexEndpoint(GetIndexEndpointRequest request)
Gets an IndexEndpoint.
|
IndexEndpoint |
getIndexEndpoint(IndexEndpointName name)
Gets an IndexEndpoint.
|
IndexEndpoint |
getIndexEndpoint(String name)
Gets an IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<GetIndexEndpointRequest,IndexEndpoint> |
getIndexEndpointCallable()
Gets an IndexEndpoint.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
SearchConfig |
getSearchConfig(GetSearchConfigRequest request)
Gets a search configuration inside a corpus.
|
SearchConfig |
getSearchConfig(SearchConfigName name)
Gets a search configuration inside a corpus.
|
SearchConfig |
getSearchConfig(String name)
Gets a search configuration inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<GetSearchConfigRequest,SearchConfig> |
getSearchConfigCallable()
Gets a search configuration inside a corpus.
|
SearchHypernym |
getSearchHypernym(GetSearchHypernymRequest request)
Gets a SearchHypernym inside a corpus.
|
SearchHypernym |
getSearchHypernym(SearchHypernymName name)
Gets a SearchHypernym inside a corpus.
|
SearchHypernym |
getSearchHypernym(String name)
Gets a SearchHypernym inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<GetSearchHypernymRequest,SearchHypernym> |
getSearchHypernymCallable()
Gets a SearchHypernym inside a corpus.
|
WarehouseSettings |
getSettings() |
WarehouseStub |
getStub() |
com.google.api.gax.longrunning.OperationFuture<ImportAssetsResponse,ImportAssetsMetadata> |
importAssetsAsync(ImportAssetsRequest request)
Imports assets (images plus annotations) from a meta file on cloud storage.
|
com.google.api.gax.rpc.UnaryCallable<ImportAssetsRequest,com.google.longrunning.Operation> |
importAssetsCallable()
Imports assets (images plus annotations) from a meta file on cloud storage.
|
com.google.api.gax.rpc.OperationCallable<ImportAssetsRequest,ImportAssetsResponse,ImportAssetsMetadata> |
importAssetsOperationCallable()
Imports assets (images plus annotations) from a meta file on cloud storage.
|
com.google.api.gax.longrunning.OperationFuture<IndexAssetResponse,IndexAssetMetadata> |
indexAssetAsync(IndexAssetRequest request)
Index one asset for search.
|
com.google.api.gax.rpc.UnaryCallable<IndexAssetRequest,com.google.longrunning.Operation> |
indexAssetCallable()
Index one asset for search.
|
com.google.api.gax.rpc.OperationCallable<IndexAssetRequest,IndexAssetResponse,IndexAssetMetadata> |
indexAssetOperationCallable()
Index one asset for search.
|
com.google.api.gax.rpc.BidiStreamingCallable<IngestAssetRequest,IngestAssetResponse> |
ingestAssetCallable()
Ingests data for the asset.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
WarehouseClient.ListAnnotationsPagedResponse |
listAnnotations(AssetName parent)
Lists a list of annotations inside asset.
|
WarehouseClient.ListAnnotationsPagedResponse |
listAnnotations(ListAnnotationsRequest request)
Lists a list of annotations inside asset.
|
WarehouseClient.ListAnnotationsPagedResponse |
listAnnotations(String parent)
Lists a list of annotations inside asset.
|
com.google.api.gax.rpc.UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse> |
listAnnotationsCallable()
Lists a list of annotations inside asset.
|
com.google.api.gax.rpc.UnaryCallable<ListAnnotationsRequest,WarehouseClient.ListAnnotationsPagedResponse> |
listAnnotationsPagedCallable()
Lists a list of annotations inside asset.
|
WarehouseClient.ListAssetsPagedResponse |
listAssets(CorpusName parent)
Lists an list of assets inside corpus.
|
WarehouseClient.ListAssetsPagedResponse |
listAssets(ListAssetsRequest request)
Lists an list of assets inside corpus.
|
WarehouseClient.ListAssetsPagedResponse |
listAssets(String parent)
Lists an list of assets inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,ListAssetsResponse> |
listAssetsCallable()
Lists an list of assets inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,WarehouseClient.ListAssetsPagedResponse> |
listAssetsPagedCallable()
Lists an list of assets inside corpus.
|
WarehouseClient.ListCollectionsPagedResponse |
listCollections(CorpusName parent)
Lists collections inside a corpus.
|
WarehouseClient.ListCollectionsPagedResponse |
listCollections(ListCollectionsRequest request)
Lists collections inside a corpus.
|
WarehouseClient.ListCollectionsPagedResponse |
listCollections(String parent)
Lists collections inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListCollectionsRequest,ListCollectionsResponse> |
listCollectionsCallable()
Lists collections inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListCollectionsRequest,WarehouseClient.ListCollectionsPagedResponse> |
listCollectionsPagedCallable()
Lists collections inside a corpus.
|
WarehouseClient.ListCorporaPagedResponse |
listCorpora(ListCorporaRequest request)
Lists all corpora in a project.
|
WarehouseClient.ListCorporaPagedResponse |
listCorpora(String parent)
Lists all corpora in a project.
|
com.google.api.gax.rpc.UnaryCallable<ListCorporaRequest,ListCorporaResponse> |
listCorporaCallable()
Lists all corpora in a project.
|
com.google.api.gax.rpc.UnaryCallable<ListCorporaRequest,WarehouseClient.ListCorporaPagedResponse> |
listCorporaPagedCallable()
Lists all corpora in a project.
|
WarehouseClient.ListDataSchemasPagedResponse |
listDataSchemas(CorpusName parent)
Lists a list of data schemas inside corpus.
|
WarehouseClient.ListDataSchemasPagedResponse |
listDataSchemas(ListDataSchemasRequest request)
Lists a list of data schemas inside corpus.
|
WarehouseClient.ListDataSchemasPagedResponse |
listDataSchemas(String parent)
Lists a list of data schemas inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListDataSchemasRequest,ListDataSchemasResponse> |
listDataSchemasCallable()
Lists a list of data schemas inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListDataSchemasRequest,WarehouseClient.ListDataSchemasPagedResponse> |
listDataSchemasPagedCallable()
Lists a list of data schemas inside corpus.
|
WarehouseClient.ListIndexEndpointsPagedResponse |
listIndexEndpoints(ListIndexEndpointsRequest request)
Lists all IndexEndpoints in a project.
|
WarehouseClient.ListIndexEndpointsPagedResponse |
listIndexEndpoints(LocationName parent)
Lists all IndexEndpoints in a project.
|
WarehouseClient.ListIndexEndpointsPagedResponse |
listIndexEndpoints(String parent)
Lists all IndexEndpoints in a project.
|
com.google.api.gax.rpc.UnaryCallable<ListIndexEndpointsRequest,ListIndexEndpointsResponse> |
listIndexEndpointsCallable()
Lists all IndexEndpoints in a project.
|
com.google.api.gax.rpc.UnaryCallable<ListIndexEndpointsRequest,WarehouseClient.ListIndexEndpointsPagedResponse> |
listIndexEndpointsPagedCallable()
Lists all IndexEndpoints in a project.
|
WarehouseClient.ListIndexesPagedResponse |
listIndexes(CorpusName parent)
List all Indexes in a given Corpus.
|
WarehouseClient.ListIndexesPagedResponse |
listIndexes(ListIndexesRequest request)
List all Indexes in a given Corpus.
|
WarehouseClient.ListIndexesPagedResponse |
listIndexes(String parent)
List all Indexes in a given Corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListIndexesRequest,ListIndexesResponse> |
listIndexesCallable()
List all Indexes in a given Corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListIndexesRequest,WarehouseClient.ListIndexesPagedResponse> |
listIndexesPagedCallable()
List all Indexes in a given Corpus.
|
WarehouseClient.ListSearchConfigsPagedResponse |
listSearchConfigs(CorpusName parent)
Lists all search configurations inside a corpus.
|
WarehouseClient.ListSearchConfigsPagedResponse |
listSearchConfigs(ListSearchConfigsRequest request)
Lists all search configurations inside a corpus.
|
WarehouseClient.ListSearchConfigsPagedResponse |
listSearchConfigs(String parent)
Lists all search configurations inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListSearchConfigsRequest,ListSearchConfigsResponse> |
listSearchConfigsCallable()
Lists all search configurations inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListSearchConfigsRequest,WarehouseClient.ListSearchConfigsPagedResponse> |
listSearchConfigsPagedCallable()
Lists all search configurations inside a corpus.
|
WarehouseClient.ListSearchHypernymsPagedResponse |
listSearchHypernyms(CorpusName parent)
Lists SearchHypernyms inside a corpus.
|
WarehouseClient.ListSearchHypernymsPagedResponse |
listSearchHypernyms(ListSearchHypernymsRequest request)
Lists SearchHypernyms inside a corpus.
|
WarehouseClient.ListSearchHypernymsPagedResponse |
listSearchHypernyms(String parent)
Lists SearchHypernyms inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListSearchHypernymsRequest,ListSearchHypernymsResponse> |
listSearchHypernymsCallable()
Lists SearchHypernyms inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<ListSearchHypernymsRequest,WarehouseClient.ListSearchHypernymsPagedResponse> |
listSearchHypernymsPagedCallable()
Lists SearchHypernyms inside a corpus.
|
RemoveCollectionItemResponse |
removeCollectionItem(CollectionItem item)
Removes an item from a collection.
|
RemoveCollectionItemResponse |
removeCollectionItem(RemoveCollectionItemRequest request)
Removes an item from a collection.
|
com.google.api.gax.rpc.UnaryCallable<RemoveCollectionItemRequest,RemoveCollectionItemResponse> |
removeCollectionItemCallable()
Removes an item from a collection.
|
com.google.api.gax.longrunning.OperationFuture<RemoveIndexAssetResponse,RemoveIndexAssetMetadata> |
removeIndexAssetAsync(RemoveIndexAssetRequest request)
Remove one asset's index data for search.
|
com.google.api.gax.rpc.UnaryCallable<RemoveIndexAssetRequest,com.google.longrunning.Operation> |
removeIndexAssetCallable()
Remove one asset's index data for search.
|
com.google.api.gax.rpc.OperationCallable<RemoveIndexAssetRequest,RemoveIndexAssetResponse,RemoveIndexAssetMetadata> |
removeIndexAssetOperationCallable()
Remove one asset's index data for search.
|
WarehouseClient.SearchAssetsPagedResponse |
searchAssets(SearchAssetsRequest request)
Search media asset.
|
com.google.api.gax.rpc.UnaryCallable<SearchAssetsRequest,SearchAssetsResponse> |
searchAssetsCallable()
Search media asset.
|
com.google.api.gax.rpc.UnaryCallable<SearchAssetsRequest,WarehouseClient.SearchAssetsPagedResponse> |
searchAssetsPagedCallable()
Search media asset.
|
WarehouseClient.SearchIndexEndpointPagedResponse |
searchIndexEndpoint(SearchIndexEndpointRequest request)
Search a deployed index endpoint (IMAGE corpus type only).
|
com.google.api.gax.rpc.UnaryCallable<SearchIndexEndpointRequest,SearchIndexEndpointResponse> |
searchIndexEndpointCallable()
Search a deployed index endpoint (IMAGE corpus type only).
|
com.google.api.gax.rpc.UnaryCallable<SearchIndexEndpointRequest,WarehouseClient.SearchIndexEndpointPagedResponse> |
searchIndexEndpointPagedCallable()
Search a deployed index endpoint (IMAGE corpus type only).
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<UndeployIndexResponse,UndeployIndexMetadata> |
undeployIndexAsync(UndeployIndexRequest request)
Undeploys an Index from IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<UndeployIndexRequest,com.google.longrunning.Operation> |
undeployIndexCallable()
Undeploys an Index from IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<UndeployIndexRequest,UndeployIndexResponse,UndeployIndexMetadata> |
undeployIndexOperationCallable()
Undeploys an Index from IndexEndpoint.
|
Annotation |
updateAnnotation(Annotation annotation,
com.google.protobuf.FieldMask updateMask)
Updates annotation inside asset.
|
Annotation |
updateAnnotation(UpdateAnnotationRequest request)
Updates annotation inside asset.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAnnotationRequest,Annotation> |
updateAnnotationCallable()
Updates annotation inside asset.
|
Asset |
updateAsset(Asset asset,
com.google.protobuf.FieldMask updateMask)
Updates an asset inside corpus.
|
Asset |
updateAsset(UpdateAssetRequest request)
Updates an asset inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAssetRequest,Asset> |
updateAssetCallable()
Updates an asset inside corpus.
|
Collection |
updateCollection(Collection collection,
com.google.protobuf.FieldMask updateMask)
Updates a collection.
|
Collection |
updateCollection(UpdateCollectionRequest request)
Updates a collection.
|
com.google.api.gax.rpc.UnaryCallable<UpdateCollectionRequest,Collection> |
updateCollectionCallable()
Updates a collection.
|
Corpus |
updateCorpus(Corpus corpus,
com.google.protobuf.FieldMask updateMask)
Updates a corpus in a project.
|
Corpus |
updateCorpus(UpdateCorpusRequest request)
Updates a corpus in a project.
|
com.google.api.gax.rpc.UnaryCallable<UpdateCorpusRequest,Corpus> |
updateCorpusCallable()
Updates a corpus in a project.
|
DataSchema |
updateDataSchema(DataSchema dataSchema,
com.google.protobuf.FieldMask updateMask)
Updates data schema inside corpus.
|
DataSchema |
updateDataSchema(UpdateDataSchemaRequest request)
Updates data schema inside corpus.
|
com.google.api.gax.rpc.UnaryCallable<UpdateDataSchemaRequest,DataSchema> |
updateDataSchemaCallable()
Updates data schema inside corpus.
|
com.google.api.gax.longrunning.OperationFuture<Index,UpdateIndexMetadata> |
updateIndexAsync(Index index,
com.google.protobuf.FieldMask updateMask)
Updates an Index under the corpus.
|
com.google.api.gax.longrunning.OperationFuture<Index,UpdateIndexMetadata> |
updateIndexAsync(UpdateIndexRequest request)
Updates an Index under the corpus.
|
com.google.api.gax.rpc.UnaryCallable<UpdateIndexRequest,com.google.longrunning.Operation> |
updateIndexCallable()
Updates an Index under the corpus.
|
com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> |
updateIndexEndpointAsync(IndexEndpoint indexEndpoint,
com.google.protobuf.FieldMask updateMask)
Updates an IndexEndpoint.
|
com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> |
updateIndexEndpointAsync(UpdateIndexEndpointRequest request)
Updates an IndexEndpoint.
|
com.google.api.gax.rpc.UnaryCallable<UpdateIndexEndpointRequest,com.google.longrunning.Operation> |
updateIndexEndpointCallable()
Updates an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<UpdateIndexEndpointRequest,IndexEndpoint,UpdateIndexEndpointMetadata> |
updateIndexEndpointOperationCallable()
Updates an IndexEndpoint.
|
com.google.api.gax.rpc.OperationCallable<UpdateIndexRequest,Index,UpdateIndexMetadata> |
updateIndexOperationCallable()
Updates an Index under the corpus.
|
SearchConfig |
updateSearchConfig(SearchConfig searchConfig,
com.google.protobuf.FieldMask updateMask)
Updates a search configuration inside a corpus.
|
SearchConfig |
updateSearchConfig(UpdateSearchConfigRequest request)
Updates a search configuration inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSearchConfigRequest,SearchConfig> |
updateSearchConfigCallable()
Updates a search configuration inside a corpus.
|
SearchHypernym |
updateSearchHypernym(SearchHypernym searchHypernym,
com.google.protobuf.FieldMask updateMask)
Updates a SearchHypernym inside a corpus.
|
SearchHypernym |
updateSearchHypernym(UpdateSearchHypernymRequest request)
Updates a SearchHypernym inside a corpus.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSearchHypernymRequest,SearchHypernym> |
updateSearchHypernymCallable()
Updates a SearchHypernym inside a corpus.
|
com.google.api.gax.longrunning.OperationFuture<UploadAssetResponse,UploadAssetMetadata> |
uploadAssetAsync(UploadAssetRequest request)
Upload asset by specifing the asset Cloud Storage uri.
|
com.google.api.gax.rpc.UnaryCallable<UploadAssetRequest,com.google.longrunning.Operation> |
uploadAssetCallable()
Upload asset by specifing the asset Cloud Storage uri.
|
com.google.api.gax.rpc.OperationCallable<UploadAssetRequest,UploadAssetResponse,UploadAssetMetadata> |
uploadAssetOperationCallable()
Upload asset by specifing the asset Cloud Storage uri.
|
WarehouseClient.ViewCollectionItemsPagedResponse |
viewCollectionItems(CollectionName collection)
View items inside a collection.
|
WarehouseClient.ViewCollectionItemsPagedResponse |
viewCollectionItems(String collection)
View items inside a collection.
|
WarehouseClient.ViewCollectionItemsPagedResponse |
viewCollectionItems(ViewCollectionItemsRequest request)
View items inside a collection.
|
com.google.api.gax.rpc.UnaryCallable<ViewCollectionItemsRequest,ViewCollectionItemsResponse> |
viewCollectionItemsCallable()
View items inside a collection.
|
com.google.api.gax.rpc.UnaryCallable<ViewCollectionItemsRequest,WarehouseClient.ViewCollectionItemsPagedResponse> |
viewCollectionItemsPagedCallable()
View items inside a collection.
|
WarehouseClient.ViewIndexedAssetsPagedResponse |
viewIndexedAssets(IndexName index)
Lists assets inside an index.
|
WarehouseClient.ViewIndexedAssetsPagedResponse |
viewIndexedAssets(String index)
Lists assets inside an index.
|
WarehouseClient.ViewIndexedAssetsPagedResponse |
viewIndexedAssets(ViewIndexedAssetsRequest request)
Lists assets inside an index.
|
com.google.api.gax.rpc.UnaryCallable<ViewIndexedAssetsRequest,ViewIndexedAssetsResponse> |
viewIndexedAssetsCallable()
Lists assets inside an index.
|
com.google.api.gax.rpc.UnaryCallable<ViewIndexedAssetsRequest,WarehouseClient.ViewIndexedAssetsPagedResponse> |
viewIndexedAssetsPagedCallable()
Lists assets inside an index.
|
protected WarehouseClient(WarehouseSettings settings) throws IOException
IOExceptionprotected WarehouseClient(WarehouseStub stub)
public static final WarehouseClient create() throws IOException
IOExceptionpublic static final WarehouseClient create(WarehouseSettings settings) throws IOException
IOExceptionpublic static final WarehouseClient create(WarehouseStub stub)
public final WarehouseSettings getSettings()
public WarehouseStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final Asset createAsset(CorpusName parent, Asset asset, String assetId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset createAsset(String parent, Asset asset, String assetId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset createAsset(CreateAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateAssetRequest,Asset> createAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Asset updateAsset(Asset asset, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset updateAsset(UpdateAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAssetRequest,Asset> updateAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Asset getAsset(AssetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the asset to retrieve. Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset getAsset(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the asset to retrieve. Format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}com.google.api.gax.rpc.ApiException - if the remote call failspublic final Asset getAsset(GetAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAssetRequest,Asset> getAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListAssetsPagedResponse listAssets(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of assets. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListAssetsPagedResponse listAssets(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of assets. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListAssetsPagedResponse listAssets(ListAssetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,WarehouseClient.ListAssetsPagedResponse> listAssetsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> deleteAssetAsync(AssetName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the asset to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> deleteAssetAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the asset to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteAssetMetadata> deleteAssetAsync(DeleteAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteAssetRequest,com.google.protobuf.Empty,DeleteAssetMetadata> deleteAssetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAssetRequest,com.google.longrunning.Operation> deleteAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<UploadAssetResponse,UploadAssetMetadata> uploadAssetAsync(UploadAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UploadAssetRequest,UploadAssetResponse,UploadAssetMetadata> uploadAssetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UploadAssetRequest,com.google.longrunning.Operation> uploadAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final GenerateRetrievalUrlResponse generateRetrievalUrl(GenerateRetrievalUrlRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GenerateRetrievalUrlRequest,GenerateRetrievalUrlResponse> generateRetrievalUrlCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<AnalyzeAssetResponse,AnalyzeAssetMetadata> analyzeAssetAsync(AnalyzeAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<AnalyzeAssetRequest,AnalyzeAssetResponse,AnalyzeAssetMetadata> analyzeAssetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<AnalyzeAssetRequest,com.google.longrunning.Operation> analyzeAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<IndexAssetResponse,IndexAssetMetadata> indexAssetAsync(IndexAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<IndexAssetRequest,IndexAssetResponse,IndexAssetMetadata> indexAssetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<IndexAssetRequest,com.google.longrunning.Operation> indexAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<RemoveIndexAssetResponse,RemoveIndexAssetMetadata> removeIndexAssetAsync(RemoveIndexAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RemoveIndexAssetRequest,RemoveIndexAssetResponse,RemoveIndexAssetMetadata> removeIndexAssetOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<RemoveIndexAssetRequest,com.google.longrunning.Operation> removeIndexAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(IndexName 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);
}
}
index - Required. The index that owns this collection of assets. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(String 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);
}
}
index - Required. The index that owns this collection of assets. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ViewIndexedAssetsPagedResponse viewIndexedAssets(ViewIndexedAssetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ViewIndexedAssetsRequest,WarehouseClient.ViewIndexedAssetsPagedResponse> viewIndexedAssetsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ViewIndexedAssetsRequest,ViewIndexedAssetsResponse> viewIndexedAssetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> createIndexAsync(CorpusName parent, Index index, String indexId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> createIndexAsync(String parent, Index index, String indexId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Index,CreateIndexMetadata> createIndexAsync(CreateIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateIndexRequest,Index,CreateIndexMetadata> createIndexOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateIndexRequest,com.google.longrunning.Operation> createIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<Index,UpdateIndexMetadata> updateIndexAsync(Index index, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Index,UpdateIndexMetadata> updateIndexAsync(UpdateIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateIndexRequest,Index,UpdateIndexMetadata> updateIndexOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateIndexRequest,com.google.longrunning.Operation> updateIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Index getIndex(IndexName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. Name of the Index resource. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Index getIndex(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. Name of the Index resource. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Index getIndex(GetIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetIndexRequest,Index> getIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListIndexesPagedResponse listIndexes(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent corpus that owns this collection of indexes. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListIndexesPagedResponse listIndexes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent corpus that owns this collection of indexes. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListIndexesPagedResponse listIndexes(ListIndexesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListIndexesRequest,WarehouseClient.ListIndexesPagedResponse> listIndexesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListIndexesRequest,ListIndexesResponse> listIndexesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> deleteIndexAsync(IndexName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the index to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> deleteIndexAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the index to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexMetadata> deleteIndexAsync(DeleteIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteIndexRequest,com.google.protobuf.Empty,DeleteIndexMetadata> deleteIndexOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteIndexRequest,com.google.longrunning.Operation> deleteIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<Corpus,CreateCorpusMetadata> createCorpusAsync(String parent, Corpus 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 = "parent-995424086";
Corpus corpus = Corpus.newBuilder().build();
Corpus response = warehouseClient.createCorpusAsync(parent, corpus).get();
}
parent - Required. Form: `projects/{project_number}/locations/{location_id}`corpus - Required. The corpus to be created.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Corpus,CreateCorpusMetadata> createCorpusAsync(CreateCorpusRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateCorpusRequest,Corpus,CreateCorpusMetadata> createCorpusOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateCorpusRequest,com.google.longrunning.Operation> createCorpusCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Corpus getCorpus(CorpusName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The resource name of the corpus to retrieve.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Corpus getCorpus(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The resource name of the corpus to retrieve.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Corpus getCorpus(GetCorpusRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCorpusRequest,Corpus> getCorpusCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Corpus updateCorpus(Corpus corpus, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
corpus - Required. The corpus which replaces the resource on the server.updateMask - The list of fields to be updated.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Corpus updateCorpus(UpdateCorpusRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateCorpusRequest,Corpus> updateCorpusCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListCorporaPagedResponse listCorpora(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The resource name of the project from which to list corpora.com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListCorporaPagedResponse listCorpora(ListCorporaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCorporaRequest,WarehouseClient.ListCorporaPagedResponse> listCorporaPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCorporaRequest,ListCorporaResponse> listCorporaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final void deleteCorpus(CorpusName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The resource name of the corpus to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteCorpus(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The resource name of the corpus to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteCorpus(DeleteCorpusRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteCorpusRequest,com.google.protobuf.Empty> deleteCorpusCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<AnalyzeCorpusResponse,AnalyzeCorpusMetadata> analyzeCorpusAsync(AnalyzeCorpusRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<AnalyzeCorpusRequest,AnalyzeCorpusResponse,AnalyzeCorpusMetadata> analyzeCorpusOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<AnalyzeCorpusRequest,com.google.longrunning.Operation> analyzeCorpusCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataSchema createDataSchema(CorpusName parent, DataSchema dataSchema)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSchema createDataSchema(String parent, DataSchema dataSchema)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSchema createDataSchema(CreateDataSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateDataSchemaRequest,DataSchema> createDataSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataSchema updateDataSchema(DataSchema dataSchema, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSchema updateDataSchema(UpdateDataSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateDataSchemaRequest,DataSchema> updateDataSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final DataSchema getDataSchema(DataSchemaName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the data schema to retrieve. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSchema getDataSchema(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the data schema to retrieve. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataSchema getDataSchema(GetDataSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataSchemaRequest,DataSchema> getDataSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteDataSchema(DataSchemaName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the data schema to delete. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDataSchema(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the data schema to delete. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteDataSchema(DeleteDataSchemaRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteDataSchemaRequest,com.google.protobuf.Empty> deleteDataSchemaCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of data schemas. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of data schemas. Format:
`projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListDataSchemasPagedResponse listDataSchemas(ListDataSchemasRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDataSchemasRequest,WarehouseClient.ListDataSchemasPagedResponse> listDataSchemasPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDataSchemasRequest,ListDataSchemasResponse> listDataSchemasCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final Annotation createAnnotation(AssetName parent, Annotation annotation, String annotationId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation createAnnotation(String parent, Annotation annotation, String annotationId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation createAnnotation(CreateAnnotationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateAnnotationRequest,Annotation> createAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Annotation getAnnotation(AnnotationName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the annotation to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation getAnnotation(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the annotation to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation getAnnotation(GetAnnotationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAnnotationRequest,Annotation> getAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(AssetName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - The parent, which owns this collection of annotations. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - The parent, which owns this collection of annotations. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAnnotationsRequest,WarehouseClient.ListAnnotationsPagedResponse> listAnnotationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse> listAnnotationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final Annotation updateAnnotation(Annotation annotation, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Annotation updateAnnotation(UpdateAnnotationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateAnnotationRequest,Annotation> updateAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteAnnotation(AnnotationName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the annotation to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAnnotation(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the annotation to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteAnnotation(DeleteAnnotationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteAnnotationRequest,com.google.protobuf.Empty> deleteAnnotationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.BidiStreamingCallable<IngestAssetRequest,IngestAssetResponse> ingestAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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.
}
}
public final ClipAssetResponse clipAsset(ClipAssetRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ClipAssetRequest,ClipAssetResponse> clipAssetCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final GenerateHlsUriResponse generateHlsUri(GenerateHlsUriRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GenerateHlsUriRequest,GenerateHlsUriResponse> generateHlsUriCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<ImportAssetsResponse,ImportAssetsMetadata> importAssetsAsync(ImportAssetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<ImportAssetsRequest,ImportAssetsResponse,ImportAssetsMetadata> importAssetsOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<ImportAssetsRequest,com.google.longrunning.Operation> importAssetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final SearchConfig createSearchConfig(CorpusName parent, SearchConfig searchConfig, String searchConfigId)
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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchConfig createSearchConfig(String parent, SearchConfig searchConfig, String searchConfigId)
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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchConfig createSearchConfig(CreateSearchConfigRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSearchConfigRequest,SearchConfig> createSearchConfigCallable()
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();
}
public final SearchConfig updateSearchConfig(SearchConfig searchConfig, com.google.protobuf.FieldMask updateMask)
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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchConfig updateSearchConfig(UpdateSearchConfigRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSearchConfigRequest,SearchConfig> updateSearchConfigCallable()
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();
}
public final SearchConfig getSearchConfig(SearchConfigName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the search configuration to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchConfig getSearchConfig(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the search configuration to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchConfig getSearchConfig(GetSearchConfigRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSearchConfigRequest,SearchConfig> getSearchConfigCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteSearchConfig(SearchConfigName name)
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);
}
name - Required. The name of the search configuration to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchConfig(String name)
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);
}
name - Required. The name of the search configuration to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchConfig(DeleteSearchConfigRequest request)
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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSearchConfigRequest,com.google.protobuf.Empty> deleteSearchConfigCallable()
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();
}
public final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of search configurations.
Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of search configurations.
Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListSearchConfigsPagedResponse listSearchConfigs(ListSearchConfigsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSearchConfigsRequest,WarehouseClient.ListSearchConfigsPagedResponse> listSearchConfigsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSearchConfigsRequest,ListSearchConfigsResponse> listSearchConfigsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final SearchHypernym createSearchHypernym(CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchHypernym createSearchHypernym(String parent, SearchHypernym searchHypernym, String searchHypernymId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchHypernym createSearchHypernym(CreateSearchHypernymRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSearchHypernymRequest,SearchHypernym> createSearchHypernymCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final SearchHypernym updateSearchHypernym(SearchHypernym searchHypernym, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchHypernym updateSearchHypernym(UpdateSearchHypernymRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSearchHypernymRequest,SearchHypernym> updateSearchHypernymCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final SearchHypernym getSearchHypernym(SearchHypernymName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the SearchHypernym to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchHypernym getSearchHypernym(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the SearchHypernym to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final SearchHypernym getSearchHypernym(GetSearchHypernymRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSearchHypernymRequest,SearchHypernym> getSearchHypernymCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final void deleteSearchHypernym(SearchHypernymName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the SearchHypernym to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchHypernym(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the SearchHypernym to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSearchHypernym(DeleteSearchHypernymRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSearchHypernymRequest,com.google.protobuf.Empty> deleteSearchHypernymCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of SearchHypernyms. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent, which owns this collection of SearchHypernyms. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListSearchHypernymsPagedResponse listSearchHypernyms(ListSearchHypernymsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSearchHypernymsRequest,WarehouseClient.ListSearchHypernymsPagedResponse> listSearchHypernymsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSearchHypernymsRequest,ListSearchHypernymsResponse> listSearchHypernymsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final WarehouseClient.SearchAssetsPagedResponse searchAssets(SearchAssetsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SearchAssetsRequest,WarehouseClient.SearchAssetsPagedResponse> searchAssetsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<SearchAssetsRequest,SearchAssetsResponse> searchAssetsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final WarehouseClient.SearchIndexEndpointPagedResponse searchIndexEndpoint(SearchIndexEndpointRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SearchIndexEndpointRequest,WarehouseClient.SearchIndexEndpointPagedResponse> searchIndexEndpointPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<SearchIndexEndpointRequest,SearchIndexEndpointResponse> searchIndexEndpointCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint, String indexEndpointId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointAsync(CreateIndexEndpointRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateIndexEndpointRequest,IndexEndpoint,CreateIndexEndpointMetadata> createIndexEndpointOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateIndexEndpointRequest,com.google.longrunning.Operation> createIndexEndpointCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final IndexEndpoint getIndexEndpoint(IndexEndpointName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. Name of the IndexEndpoint resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IndexEndpoint getIndexEndpoint(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. Name of the IndexEndpoint resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final IndexEndpoint getIndexEndpoint(GetIndexEndpointRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetIndexEndpointRequest,IndexEndpoint> getIndexEndpointCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. Format: `projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListIndexEndpointsPagedResponse listIndexEndpoints(ListIndexEndpointsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListIndexEndpointsRequest,WarehouseClient.ListIndexEndpointsPagedResponse> listIndexEndpointsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListIndexEndpointsRequest,ListIndexEndpointsResponse> listIndexEndpointsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointAsync(IndexEndpoint indexEndpoint, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointAsync(UpdateIndexEndpointRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateIndexEndpointRequest,IndexEndpoint,UpdateIndexEndpointMetadata> updateIndexEndpointOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateIndexEndpointRequest,com.google.longrunning.Operation> updateIndexEndpointCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(IndexEndpointName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. Name of the resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointAsync(DeleteIndexEndpointRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteIndexEndpointRequest,com.google.protobuf.Empty,DeleteIndexEndpointMetadata> deleteIndexEndpointOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteIndexEndpointRequest,com.google.longrunning.Operation> deleteIndexEndpointCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<DeployIndexResponse,DeployIndexMetadata> deployIndexAsync(DeployIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeployIndexRequest,DeployIndexResponse,DeployIndexMetadata> deployIndexOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeployIndexRequest,com.google.longrunning.Operation> deployIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<UndeployIndexResponse,UndeployIndexMetadata> undeployIndexAsync(UndeployIndexRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UndeployIndexRequest,UndeployIndexResponse,UndeployIndexMetadata> undeployIndexOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UndeployIndexRequest,com.google.longrunning.Operation> undeployIndexCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(CorpusName parent, Collection collection, String collectionId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(String parent, Collection collection, String collectionId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Collection,CreateCollectionMetadata> createCollectionAsync(CreateCollectionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateCollectionRequest,Collection,CreateCollectionMetadata> createCollectionOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateCollectionRequest,com.google.longrunning.Operation> createCollectionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> deleteCollectionAsync(CollectionName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the collection to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> deleteCollectionAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
name - Required. The name of the collection to delete. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteCollectionMetadata> deleteCollectionAsync(DeleteCollectionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteCollectionRequest,com.google.protobuf.Empty,DeleteCollectionMetadata> deleteCollectionOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteCollectionRequest,com.google.longrunning.Operation> deleteCollectionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Collection getCollection(CollectionName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the collection to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Collection getCollection(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
name - Required. The name of the collection to retrieve. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Collection getCollection(GetCollectionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetCollectionRequest,Collection> getCollectionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final Collection updateCollection(Collection collection, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
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`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Collection updateCollection(UpdateCollectionRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateCollectionRequest,Collection> updateCollectionCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ListCollectionsPagedResponse listCollections(CorpusName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent corpus. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListCollectionsPagedResponse listCollections(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
parent - Required. The parent corpus. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ListCollectionsPagedResponse listCollections(ListCollectionsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListCollectionsRequest,WarehouseClient.ListCollectionsPagedResponse> listCollectionsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListCollectionsRequest,ListCollectionsResponse> listCollectionsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final AddCollectionItemResponse addCollectionItem(CollectionItem item)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
item - Required. The item to be added.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AddCollectionItemResponse addCollectionItem(AddCollectionItemRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<AddCollectionItemRequest,AddCollectionItemResponse> addCollectionItemCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final RemoveCollectionItemResponse removeCollectionItem(CollectionItem item)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
item - Required. The item to be removed.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RemoveCollectionItemResponse removeCollectionItem(RemoveCollectionItemRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<RemoveCollectionItemRequest,RemoveCollectionItemResponse> removeCollectionItemCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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();
}
public final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(CollectionName 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);
}
}
collection - Required. The collection to view. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(String 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);
}
}
collection - Required. The collection to view. Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final WarehouseClient.ViewCollectionItemsPagedResponse viewCollectionItems(ViewCollectionItemsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ViewCollectionItemsRequest,WarehouseClient.ViewCollectionItemsPagedResponse> viewCollectionItemsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ViewCollectionItemsRequest,ViewCollectionItemsResponse> viewCollectionItemsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating 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;
}
}
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.