All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.visionai.v1.WarehouseClient Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.visionai.v1;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.BidiStreamingCallable;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.visionai.v1.stub.WarehouseStub;
import com.google.cloud.visionai.v1.stub.WarehouseStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: Service that manages media content + metadata for streaming.
 *
 * 

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

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

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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

CreateAsset

Creates an asset inside corpus.

*

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

*
    *
  • createAsset(CreateAssetRequest request) *

*

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

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

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

*

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

*
    *
  • createAssetCallable() *

*

UpdateAsset

Updates an asset inside corpus.

*

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

*
    *
  • updateAsset(UpdateAssetRequest request) *

*

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

*
    *
  • updateAsset(Asset asset, FieldMask updateMask) *

*

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

*
    *
  • updateAssetCallable() *

*

GetAsset

Reads an asset inside corpus.

*

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

*
    *
  • getAsset(GetAssetRequest request) *

*

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

*
    *
  • getAsset(AssetName name) *

  • getAsset(String name) *

*

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

*
    *
  • getAssetCallable() *

*

ListAssets

Lists an list of assets inside corpus.

*

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

*
    *
  • listAssets(ListAssetsRequest request) *

*

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

*
    *
  • listAssets(CorpusName parent) *

  • listAssets(String parent) *

*

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

*
    *
  • listAssetsPagedCallable() *

  • listAssetsCallable() *

*

DeleteAsset

Deletes asset inside corpus.

*

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

*
    *
  • deleteAssetAsync(DeleteAssetRequest request) *

*

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

*
    *
  • deleteAssetAsync(AssetName name) *

  • deleteAssetAsync(String name) *

*

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

*
    *
  • deleteAssetOperationCallable() *

  • deleteAssetCallable() *

*

UploadAsset

Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users who call this API have read access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and grant the read access of the cloud storage files to that service account.

*

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

*
    *
  • uploadAssetAsync(UploadAssetRequest request) *

*

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

*
    *
  • uploadAssetOperationCallable() *

  • uploadAssetCallable() *

*

GenerateRetrievalUrl

Generates a signed url for downloading the asset. For video warehouse, please see comment of UploadAsset about how to allow retrieval of cloud storage files in a different project.

*

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

*
    *
  • generateRetrievalUrl(GenerateRetrievalUrlRequest request) *

*

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

*
    *
  • generateRetrievalUrlCallable() *

*

AnalyzeAsset

Analyze asset to power search capability.

*

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

*
    *
  • analyzeAssetAsync(AnalyzeAssetRequest request) *

*

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

*
    *
  • analyzeAssetOperationCallable() *

  • analyzeAssetCallable() *

*

IndexAsset

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

*

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

*
    *
  • indexAssetAsync(IndexAssetRequest request) *

*

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

*
    *
  • indexAssetOperationCallable() *

  • indexAssetCallable() *

*

RemoveIndexAsset

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

*

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

*
    *
  • removeIndexAssetAsync(RemoveIndexAssetRequest request) *

*

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

*
    *
  • removeIndexAssetOperationCallable() *

  • removeIndexAssetCallable() *

*

ViewIndexedAssets

Lists assets inside an index.

*

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

*
    *
  • viewIndexedAssets(ViewIndexedAssetsRequest request) *

*

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

*
    *
  • viewIndexedAssets(IndexName index) *

  • viewIndexedAssets(String index) *

*

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

*
    *
  • viewIndexedAssetsPagedCallable() *

  • viewIndexedAssetsCallable() *

*

CreateIndex

Creates an Index under the corpus.

*

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

*
    *
  • createIndexAsync(CreateIndexRequest request) *

*

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

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

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

*

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

*
    *
  • createIndexOperationCallable() *

  • createIndexCallable() *

*

UpdateIndex

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

*

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

*
    *
  • updateIndexAsync(UpdateIndexRequest request) *

*

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

*
    *
  • updateIndexAsync(Index index, FieldMask updateMask) *

*

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

*
    *
  • updateIndexOperationCallable() *

  • updateIndexCallable() *

*

GetIndex

Gets the details of a single Index under a Corpus.

*

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

*
    *
  • getIndex(GetIndexRequest request) *

*

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

*
    *
  • getIndex(IndexName name) *

  • getIndex(String name) *

*

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

*
    *
  • getIndexCallable() *

*

ListIndexes

List all Indexes in a given Corpus.

*

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

*
    *
  • listIndexes(ListIndexesRequest request) *

*

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

*
    *
  • listIndexes(CorpusName parent) *

  • listIndexes(String parent) *

*

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

*
    *
  • listIndexesPagedCallable() *

  • listIndexesCallable() *

*

DeleteIndex

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

*

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

*
    *
  • deleteIndexAsync(DeleteIndexRequest request) *

*

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

*
    *
  • deleteIndexAsync(IndexName name) *

  • deleteIndexAsync(String name) *

*

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

*
    *
  • deleteIndexOperationCallable() *

  • deleteIndexCallable() *

*

CreateCorpus

Creates a corpus inside a project.

*

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

*
    *
  • createCorpusAsync(CreateCorpusRequest request) *

*

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

*
    *
  • createCorpusAsync(String parent, Corpus corpus) *

*

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

*
    *
  • createCorpusOperationCallable() *

  • createCorpusCallable() *

*

GetCorpus

Gets corpus details inside a project.

*

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

*
    *
  • getCorpus(GetCorpusRequest request) *

*

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

*
    *
  • getCorpus(CorpusName name) *

  • getCorpus(String name) *

*

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

*
    *
  • getCorpusCallable() *

*

UpdateCorpus

Updates a corpus in a project.

*

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

*
    *
  • updateCorpus(UpdateCorpusRequest request) *

*

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

*
    *
  • updateCorpus(Corpus corpus, FieldMask updateMask) *

*

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

*
    *
  • updateCorpusCallable() *

*

ListCorpora

Lists all corpora in a project.

*

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

*
    *
  • listCorpora(ListCorporaRequest request) *

*

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

*
    *
  • listCorpora(String parent) *

*

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

*
    *
  • listCorporaPagedCallable() *

  • listCorporaCallable() *

*

DeleteCorpus

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

*

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

*
    *
  • deleteCorpus(DeleteCorpusRequest request) *

*

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

*
    *
  • deleteCorpus(CorpusName name) *

  • deleteCorpus(String name) *

*

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

*
    *
  • deleteCorpusCallable() *

*

AnalyzeCorpus

Analyzes a corpus.

*

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

*
    *
  • analyzeCorpusAsync(AnalyzeCorpusRequest request) *

*

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

*
    *
  • analyzeCorpusOperationCallable() *

  • analyzeCorpusCallable() *

*

CreateDataSchema

Creates data schema inside corpus.

*

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

*
    *
  • createDataSchema(CreateDataSchemaRequest request) *

*

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

*
    *
  • createDataSchema(CorpusName parent, DataSchema dataSchema) *

  • createDataSchema(String parent, DataSchema dataSchema) *

*

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

*
    *
  • createDataSchemaCallable() *

*

UpdateDataSchema

Updates data schema inside corpus.

*

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

*
    *
  • updateDataSchema(UpdateDataSchemaRequest request) *

*

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

*
    *
  • updateDataSchema(DataSchema dataSchema, FieldMask updateMask) *

*

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

*
    *
  • updateDataSchemaCallable() *

*

GetDataSchema

Gets data schema inside corpus.

*

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

*
    *
  • getDataSchema(GetDataSchemaRequest request) *

*

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

*
    *
  • getDataSchema(DataSchemaName name) *

  • getDataSchema(String name) *

*

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

*
    *
  • getDataSchemaCallable() *

*

DeleteDataSchema

Deletes data schema inside corpus.

*

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

*
    *
  • deleteDataSchema(DeleteDataSchemaRequest request) *

*

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

*
    *
  • deleteDataSchema(DataSchemaName name) *

  • deleteDataSchema(String name) *

*

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

*
    *
  • deleteDataSchemaCallable() *

*

ListDataSchemas

Lists a list of data schemas inside corpus.

*

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

*
    *
  • listDataSchemas(ListDataSchemasRequest request) *

*

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

*
    *
  • listDataSchemas(CorpusName parent) *

  • listDataSchemas(String parent) *

*

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

*
    *
  • listDataSchemasPagedCallable() *

  • listDataSchemasCallable() *

*

CreateAnnotation

Creates annotation inside asset.

*

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

*
    *
  • createAnnotation(CreateAnnotationRequest request) *

*

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

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

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

*

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

*
    *
  • createAnnotationCallable() *

*

GetAnnotation

Reads annotation inside asset.

*

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

*
    *
  • getAnnotation(GetAnnotationRequest request) *

*

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

*
    *
  • getAnnotation(AnnotationName name) *

  • getAnnotation(String name) *

*

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

*
    *
  • getAnnotationCallable() *

*

ListAnnotations

Lists a list of annotations inside asset.

*

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

*
    *
  • listAnnotations(ListAnnotationsRequest request) *

*

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

*
    *
  • listAnnotations(AssetName parent) *

  • listAnnotations(String parent) *

*

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

*
    *
  • listAnnotationsPagedCallable() *

  • listAnnotationsCallable() *

*

UpdateAnnotation

Updates annotation inside asset.

*

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

*
    *
  • updateAnnotation(UpdateAnnotationRequest request) *

*

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

*
    *
  • updateAnnotation(Annotation annotation, FieldMask updateMask) *

*

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

*
    *
  • updateAnnotationCallable() *

*

DeleteAnnotation

Deletes annotation inside asset.

*

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

*
    *
  • deleteAnnotation(DeleteAnnotationRequest request) *

*

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

*
    *
  • deleteAnnotation(AnnotationName name) *

  • deleteAnnotation(String name) *

*

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

*
    *
  • deleteAnnotationCallable() *

*

IngestAsset

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

*

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

*
    *
  • ingestAssetCallable() *

*

ClipAsset

Supported by STREAM_VIDEO corpus type. Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

*

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

*
    *
  • clipAsset(ClipAssetRequest request) *

*

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

*
    *
  • clipAssetCallable() *

*

GenerateHlsUri

Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

*

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

*
    *
  • generateHlsUri(GenerateHlsUriRequest request) *

*

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

*
    *
  • generateHlsUriCallable() *

*

ImportAssets

Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.

*

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

*
    *
  • importAssetsAsync(ImportAssetsRequest request) *

*

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

*
    *
  • importAssetsOperationCallable() *

  • importAssetsCallable() *

*

CreateSearchConfig

Creates a search configuration inside a corpus. *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. Request must contain at least one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

*

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

*
    *
  • createSearchConfig(CreateSearchConfigRequest request) *

*

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

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

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

*

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

*
    *
  • createSearchConfigCallable() *

*

UpdateSearchConfig

Updates a search configuration inside a corpus. *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

*

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

*
    *
  • updateSearchConfig(UpdateSearchConfigRequest request) *

*

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

*
    *
  • updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask) *

*

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

*
    *
  • updateSearchConfigCallable() *

*

GetSearchConfig

Gets a search configuration inside a corpus.

*

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

*
    *
  • getSearchConfig(GetSearchConfigRequest request) *

*

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

*
    *
  • getSearchConfig(SearchConfigName name) *

  • getSearchConfig(String name) *

*

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

*
    *
  • getSearchConfigCallable() *

*

DeleteSearchConfig

Deletes a search configuration inside a corpus. *

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

*

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

*
    *
  • deleteSearchConfig(DeleteSearchConfigRequest request) *

*

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

*
    *
  • deleteSearchConfig(SearchConfigName name) *

  • deleteSearchConfig(String name) *

*

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

*
    *
  • deleteSearchConfigCallable() *

*

ListSearchConfigs

Lists all search configurations inside a corpus.

*

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

*
    *
  • listSearchConfigs(ListSearchConfigsRequest request) *

*

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

*
    *
  • listSearchConfigs(CorpusName parent) *

  • listSearchConfigs(String parent) *

*

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

*
    *
  • listSearchConfigsPagedCallable() *

  • listSearchConfigsCallable() *

*

CreateSearchHypernym

Creates a SearchHypernym inside a corpus.

*

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

*
    *
  • createSearchHypernym(CreateSearchHypernymRequest request) *

*

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

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

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

*

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

*
    *
  • createSearchHypernymCallable() *

*

UpdateSearchHypernym

Updates a SearchHypernym inside a corpus.

*

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

*
    *
  • updateSearchHypernym(UpdateSearchHypernymRequest request) *

*

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

*
    *
  • updateSearchHypernym(SearchHypernym searchHypernym, FieldMask updateMask) *

*

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

*
    *
  • updateSearchHypernymCallable() *

*

GetSearchHypernym

Gets a SearchHypernym inside a corpus.

*

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

*
    *
  • getSearchHypernym(GetSearchHypernymRequest request) *

*

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

*
    *
  • getSearchHypernym(SearchHypernymName name) *

  • getSearchHypernym(String name) *

*

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

*
    *
  • getSearchHypernymCallable() *

*

DeleteSearchHypernym

Deletes a SearchHypernym inside a corpus.

*

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

*
    *
  • deleteSearchHypernym(DeleteSearchHypernymRequest request) *

*

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

*
    *
  • deleteSearchHypernym(SearchHypernymName name) *

  • deleteSearchHypernym(String name) *

*

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

*
    *
  • deleteSearchHypernymCallable() *

*

ListSearchHypernyms

Lists SearchHypernyms inside a corpus.

*

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

*
    *
  • listSearchHypernyms(ListSearchHypernymsRequest request) *

*

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

*
    *
  • listSearchHypernyms(CorpusName parent) *

  • listSearchHypernyms(String parent) *

*

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

*
    *
  • listSearchHypernymsPagedCallable() *

  • listSearchHypernymsCallable() *

*

SearchAssets

Search media asset.

*

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

*
    *
  • searchAssets(SearchAssetsRequest request) *

*

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

*
    *
  • searchAssetsPagedCallable() *

  • searchAssetsCallable() *

*

SearchIndexEndpoint

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

*

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

*
    *
  • searchIndexEndpoint(SearchIndexEndpointRequest request) *

*

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

*
    *
  • searchIndexEndpointPagedCallable() *

  • searchIndexEndpointCallable() *

*

CreateIndexEndpoint

Creates an IndexEndpoint.

*

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

*
    *
  • createIndexEndpointAsync(CreateIndexEndpointRequest request) *

*

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

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

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

*

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

*
    *
  • createIndexEndpointOperationCallable() *

  • createIndexEndpointCallable() *

*

GetIndexEndpoint

Gets an IndexEndpoint.

*

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

*
    *
  • getIndexEndpoint(GetIndexEndpointRequest request) *

*

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

*
    *
  • getIndexEndpoint(IndexEndpointName name) *

  • getIndexEndpoint(String name) *

*

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

*
    *
  • getIndexEndpointCallable() *

*

ListIndexEndpoints

Lists all IndexEndpoints in a project.

*

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

*
    *
  • listIndexEndpoints(ListIndexEndpointsRequest request) *

*

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

*
    *
  • listIndexEndpoints(LocationName parent) *

  • listIndexEndpoints(String parent) *

*

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

*
    *
  • listIndexEndpointsPagedCallable() *

  • listIndexEndpointsCallable() *

*

UpdateIndexEndpoint

Updates an IndexEndpoint.

*

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

*
    *
  • updateIndexEndpointAsync(UpdateIndexEndpointRequest request) *

*

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

*
    *
  • updateIndexEndpointAsync(IndexEndpoint indexEndpoint, FieldMask updateMask) *

*

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

*
    *
  • updateIndexEndpointOperationCallable() *

  • updateIndexEndpointCallable() *

*

DeleteIndexEndpoint

Deletes an IndexEndpoint.

*

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

*
    *
  • deleteIndexEndpointAsync(DeleteIndexEndpointRequest request) *

*

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

*
    *
  • deleteIndexEndpointAsync(IndexEndpointName name) *

  • deleteIndexEndpointAsync(String name) *

*

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

*
    *
  • deleteIndexEndpointOperationCallable() *

  • deleteIndexEndpointCallable() *

*

DeployIndex

Deploys an Index to IndexEndpoint.

*

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

*
    *
  • deployIndexAsync(DeployIndexRequest request) *

*

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

*
    *
  • deployIndexOperationCallable() *

  • deployIndexCallable() *

*

UndeployIndex

Undeploys an Index from IndexEndpoint.

*

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

*
    *
  • undeployIndexAsync(UndeployIndexRequest request) *

*

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

*
    *
  • undeployIndexOperationCallable() *

  • undeployIndexCallable() *

*

CreateCollection

Creates a collection.

*

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

*
    *
  • createCollectionAsync(CreateCollectionRequest request) *

*

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

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

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

*

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

*
    *
  • createCollectionOperationCallable() *

  • createCollectionCallable() *

*

DeleteCollection

Deletes a collection.

*

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

*
    *
  • deleteCollectionAsync(DeleteCollectionRequest request) *

*

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

*
    *
  • deleteCollectionAsync(CollectionName name) *

  • deleteCollectionAsync(String name) *

*

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

*
    *
  • deleteCollectionOperationCallable() *

  • deleteCollectionCallable() *

*

GetCollection

Gets a collection.

*

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

*
    *
  • getCollection(GetCollectionRequest request) *

*

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

*
    *
  • getCollection(CollectionName name) *

  • getCollection(String name) *

*

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

*
    *
  • getCollectionCallable() *

*

UpdateCollection

Updates a collection.

*

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

*
    *
  • updateCollection(UpdateCollectionRequest request) *

*

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

*
    *
  • updateCollection(Collection collection, FieldMask updateMask) *

*

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

*
    *
  • updateCollectionCallable() *

*

ListCollections

Lists collections inside a corpus.

*

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

*
    *
  • listCollections(ListCollectionsRequest request) *

*

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

*
    *
  • listCollections(CorpusName parent) *

  • listCollections(String parent) *

*

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

*
    *
  • listCollectionsPagedCallable() *

  • listCollectionsCallable() *

*

AddCollectionItem

Adds an item into a Collection.

*

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

*
    *
  • addCollectionItem(AddCollectionItemRequest request) *

*

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

*
    *
  • addCollectionItem(CollectionItem item) *

*

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

*
    *
  • addCollectionItemCallable() *

*

RemoveCollectionItem

Removes an item from a collection.

*

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

*
    *
  • removeCollectionItem(RemoveCollectionItemRequest request) *

*

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

*
    *
  • removeCollectionItem(CollectionItem item) *

*

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

*
    *
  • removeCollectionItemCallable() *

*

ViewCollectionItems

View items inside a collection.

*

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

*
    *
  • viewCollectionItems(ViewCollectionItemsRequest request) *

*

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

*
    *
  • viewCollectionItems(CollectionName collection) *

  • viewCollectionItems(String collection) *

*

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

*
    *
  • viewCollectionItemsPagedCallable() *

  • viewCollectionItemsCallable() *

*
* *

See the individual methods for example code. * *

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

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

To customize credentials: * *

{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require 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: * *

{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require 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: * *

{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require 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. */ @Generated("by gapic-generator-java") public class WarehouseClient implements BackgroundResource { private final WarehouseSettings settings; private final WarehouseStub stub; private final OperationsClient httpJsonOperationsClient; private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of WarehouseClient with default settings. */ public static final WarehouseClient create() throws IOException { return create(WarehouseSettings.newBuilder().build()); } /** * Constructs an instance of WarehouseClient, using the given settings. The channels are created * based on the settings passed in, or defaults for any settings that are not set. */ public static final WarehouseClient create(WarehouseSettings settings) throws IOException { return new WarehouseClient(settings); } /** * Constructs an instance of WarehouseClient, using the given stub for making calls. This is for * advanced usage - prefer using create(WarehouseSettings). */ public static final WarehouseClient create(WarehouseStub stub) { return new WarehouseClient(stub); } /** * Constructs an instance of WarehouseClient, using the given settings. This is protected so that * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. */ protected WarehouseClient(WarehouseSettings settings) throws IOException { this.settings = settings; this.stub = ((WarehouseStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected WarehouseClient(WarehouseStub stub) { this.settings = null; this.stub = stub; this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final WarehouseSettings getSettings() { return settings; } public WarehouseStub getStub() { return stub; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ public final com.google.longrunning.OperationsClient getOperationsClient() { return operationsClient; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this asset will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param asset Required. The asset to create. * @param assetId Optional. The ID to use for the asset, which will become the final component of * the asset's resource name if user choose to specify. Otherwise, asset id will be generated * by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset createAsset(CorpusName parent, Asset asset, String assetId) { CreateAssetRequest request = CreateAssetRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setAsset(asset) .setAssetId(assetId) .build(); return createAsset(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this asset will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param asset Required. The asset to create. * @param assetId Optional. The ID to use for the asset, which will become the final component of * the asset's resource name if user choose to specify. Otherwise, asset id will be generated * by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset createAsset(String parent, Asset asset, String assetId) { CreateAssetRequest request = CreateAssetRequest.newBuilder() .setParent(parent) .setAsset(asset) .setAssetId(assetId) .build(); return createAsset(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset createAsset(CreateAssetRequest request) { return createAssetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createAssetCallable().futureCall(request);
   *   // Do something.
   *   Asset response = future.get();
   * }
   * }
*/ public final UnaryCallable createAssetCallable() { return stub.createAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset updateAsset(Asset asset, FieldMask updateMask) { UpdateAssetRequest request = UpdateAssetRequest.newBuilder().setAsset(asset).setUpdateMask(updateMask).build(); return updateAsset(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset updateAsset(UpdateAssetRequest request) { return updateAssetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateAssetCallable().futureCall(request);
   *   // Do something.
   *   Asset response = future.get();
   * }
   * }
*/ public final UnaryCallable updateAssetCallable() { return stub.updateAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the asset to retrieve. Format: * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset getAsset(AssetName name) { GetAssetRequest request = GetAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getAsset(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the asset to retrieve. Format: * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset getAsset(String name) { GetAssetRequest request = GetAssetRequest.newBuilder().setName(name).build(); return getAsset(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Asset getAsset(GetAssetRequest request) { return getAssetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads an asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getAssetCallable().futureCall(request);
   *   // Do something.
   *   Asset response = future.get();
   * }
   * }
*/ public final UnaryCallable getAssetCallable() { return stub.getAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists an list of assets inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of assets. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(CorpusName parent) { ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listAssets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists an list of assets inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of assets. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(String parent) { ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); return listAssets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists an list of assets inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { return listAssetsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists an list of assets inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.listAssetsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Asset element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listAssetsPagedCallable() { return stub.listAssetsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists an list of assets inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listAssetsCallable() { return stub.listAssetsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the asset to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAssetAsync(AssetName name) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteAssetAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the asset to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAssetAsync(String name) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name).build(); return deleteAssetAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteAssetAsync( DeleteAssetRequest request) { return deleteAssetOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deleteAssetOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteAssetOperationCallable() { return stub.deleteAssetOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes asset inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteAssetCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteAssetCallable() { return stub.deleteAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users * who call this API have read access to the cloud storage file. Once it is uploaded, it can be * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files * from the same project of the warehouse. To allow retrieval cloud storage files that are in a * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and * grant the read access of the cloud storage files to that service account. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture uploadAssetAsync( UploadAssetRequest request) { return uploadAssetOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users * who call this API have read access to the cloud storage file. Once it is uploaded, it can be * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files * from the same project of the warehouse. To allow retrieval cloud storage files that are in a * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and * grant the read access of the cloud storage files to that service account. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.uploadAssetOperationCallable().futureCall(request);
   *   // Do something.
   *   UploadAssetResponse response = future.get();
   * }
   * }
*/ public final OperationCallable uploadAssetOperationCallable() { return stub.uploadAssetOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users * who call this API have read access to the cloud storage file. Once it is uploaded, it can be * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files * from the same project of the warehouse. To allow retrieval cloud storage files that are in a * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and * grant the read access of the cloud storage files to that service account. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.uploadAssetCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable uploadAssetCallable() { return stub.uploadAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Generates a signed url for downloading the asset. For video warehouse, please see comment of * UploadAsset about how to allow retrieval of cloud storage files in a different project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateRetrievalUrlResponse generateRetrievalUrl( GenerateRetrievalUrlRequest request) { return generateRetrievalUrlCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Generates a signed url for downloading the asset. For video warehouse, please see comment of * UploadAsset about how to allow retrieval of cloud storage files in a different project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.generateRetrievalUrlCallable().futureCall(request);
   *   // Do something.
   *   GenerateRetrievalUrlResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable generateRetrievalUrlCallable() { return stub.generateRetrievalUrlCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyze asset to power search capability. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture analyzeAssetAsync( AnalyzeAssetRequest request) { return analyzeAssetOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyze asset to power search capability. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.analyzeAssetOperationCallable().futureCall(request);
   *   // Do something.
   *   AnalyzeAssetResponse response = future.get();
   * }
   * }
*/ public final OperationCallable analyzeAssetOperationCallable() { return stub.analyzeAssetOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyze asset to power search capability. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.analyzeAssetCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable analyzeAssetCallable() { return stub.analyzeAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture indexAssetAsync( IndexAssetRequest request) { return indexAssetOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.indexAssetOperationCallable().futureCall(request);
   *   // Do something.
   *   IndexAssetResponse response = future.get();
   * }
   * }
*/ public final OperationCallable indexAssetOperationCallable() { return stub.indexAssetOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.indexAssetCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable indexAssetCallable() { return stub.indexAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeIndexAssetAsync(RemoveIndexAssetRequest request) { return removeIndexAssetOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.removeIndexAssetOperationCallable().futureCall(request);
   *   // Do something.
   *   RemoveIndexAssetResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> removeIndexAssetOperationCallable() { return stub.removeIndexAssetOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.removeIndexAssetCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable removeIndexAssetCallable() { return stub.removeIndexAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists assets inside an index. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param index Required. The index that owns this collection of assets. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewIndexedAssetsPagedResponse viewIndexedAssets(IndexName index) { ViewIndexedAssetsRequest request = ViewIndexedAssetsRequest.newBuilder() .setIndex(index == null ? null : index.toString()) .build(); return viewIndexedAssets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists assets inside an index. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param index Required. The index that owns this collection of assets. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewIndexedAssetsPagedResponse viewIndexedAssets(String index) { ViewIndexedAssetsRequest request = ViewIndexedAssetsRequest.newBuilder().setIndex(index).build(); return viewIndexedAssets(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists assets inside an index. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewIndexedAssetsPagedResponse viewIndexedAssets(ViewIndexedAssetsRequest request) { return viewIndexedAssetsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists assets inside an index. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.viewIndexedAssetsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (IndexedAsset element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable viewIndexedAssetsPagedCallable() { return stub.viewIndexedAssetsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists assets inside an index. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable viewIndexedAssetsCallable() { return stub.viewIndexedAssetsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Index under the corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param 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}` * @param index Required. The index being created. * @param indexId Optional. The ID for the index. This will become the final resource name for the * index. If the user does not specify this value, it will be generated by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexAsync( CorpusName parent, Index index, String indexId) { CreateIndexRequest request = CreateIndexRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setIndex(index) .setIndexId(indexId) .build(); return createIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Index under the corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param 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}` * @param index Required. The index being created. * @param indexId Optional. The ID for the index. This will become the final resource name for the * index. If the user does not specify this value, it will be generated by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexAsync( String parent, Index index, String indexId) { CreateIndexRequest request = CreateIndexRequest.newBuilder() .setParent(parent) .setIndex(index) .setIndexId(indexId) .build(); return createIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Index under the corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexAsync( CreateIndexRequest request) { return createIndexOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Index under the corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createIndexOperationCallable().futureCall(request);
   *   // Do something.
   *   Index response = future.get();
   * }
   * }
*/ public final OperationCallable createIndexOperationCallable() { return stub.createIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Index under the corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createIndexCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createIndexCallable() { return stub.createIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full * index rebuild with different update_mask values. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param index Required. The resource being updated. * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the * Index resource by the update. The fields specified in the update_mask are relative to the * resource, not the full request. A field of the resource will be overwritten if it is in the * mask. Empty field mask is not allowed. If the mask is "*", it triggers a full update of * the index, and also a whole rebuild of index data. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateIndexAsync( Index index, FieldMask updateMask) { UpdateIndexRequest request = UpdateIndexRequest.newBuilder().setIndex(index).setUpdateMask(updateMask).build(); return updateIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full * index rebuild with different update_mask values. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateIndexAsync( UpdateIndexRequest request) { return updateIndexOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full * index rebuild with different update_mask values. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.updateIndexOperationCallable().futureCall(request);
   *   // Do something.
   *   Index response = future.get();
   * }
   * }
*/ public final OperationCallable updateIndexOperationCallable() { return stub.updateIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full * index rebuild with different update_mask values. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateIndexCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateIndexCallable() { return stub.updateIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the details of a single Index under a Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. Name of the Index resource. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Index getIndex(IndexName name) { GetIndexRequest request = GetIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getIndex(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the details of a single Index under a Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. Name of the Index resource. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Index getIndex(String name) { GetIndexRequest request = GetIndexRequest.newBuilder().setName(name).build(); return getIndex(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the details of a single Index under a Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Index getIndex(GetIndexRequest request) { return getIndexCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the details of a single Index under a Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getIndexCallable().futureCall(request);
   *   // Do something.
   *   Index response = future.get();
   * }
   * }
*/ public final UnaryCallable getIndexCallable() { return stub.getIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List all Indexes in a given Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent corpus that owns this collection of indexes. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexesPagedResponse listIndexes(CorpusName parent) { ListIndexesRequest request = ListIndexesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listIndexes(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List all Indexes in a given Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent corpus that owns this collection of indexes. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexesPagedResponse listIndexes(String parent) { ListIndexesRequest request = ListIndexesRequest.newBuilder().setParent(parent).build(); return listIndexes(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List all Indexes in a given Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) { return listIndexesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List all Indexes in a given Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.listIndexesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Index element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listIndexesPagedCallable() { return stub.listIndexesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List all Indexes in a given Corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listIndexesCallable() { return stub.listIndexesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Delete a single Index. In order to delete an index, the caller must make sure that it is not * deployed to any index endpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the index to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexAsync(IndexName name) { DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Delete a single Index. In order to delete an index, the caller must make sure that it is not * deployed to any index endpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the index to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexAsync(String name) { DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build(); return deleteIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Delete a single Index. In order to delete an index, the caller must make sure that it is not * deployed to any index endpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexAsync( DeleteIndexRequest request) { return deleteIndexOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Delete a single Index. In order to delete an index, the caller must make sure that it is not * deployed to any index endpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deleteIndexOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteIndexOperationCallable() { return stub.deleteIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Delete a single Index. In order to delete an index, the caller must make sure that it is not * deployed to any index endpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteIndexCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteIndexCallable() { return stub.deleteIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a corpus inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param parent Required. Form: `projects/{project_number}/locations/{location_id}` * @param corpus Required. The corpus to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCorpusAsync( String parent, Corpus corpus) { CreateCorpusRequest request = CreateCorpusRequest.newBuilder().setParent(parent).setCorpus(corpus).build(); return createCorpusAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a corpus inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCorpusAsync( CreateCorpusRequest request) { return createCorpusOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a corpus inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createCorpusOperationCallable().futureCall(request);
   *   // Do something.
   *   Corpus response = future.get();
   * }
   * }
*/ public final OperationCallable createCorpusOperationCallable() { return stub.createCorpusOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a corpus inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createCorpusCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createCorpusCallable() { return stub.createCorpusCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets corpus details inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The resource name of the corpus to retrieve. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Corpus getCorpus(CorpusName name) { GetCorpusRequest request = GetCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getCorpus(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets corpus details inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The resource name of the corpus to retrieve. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Corpus getCorpus(String name) { GetCorpusRequest request = GetCorpusRequest.newBuilder().setName(name).build(); return getCorpus(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets corpus details inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Corpus getCorpus(GetCorpusRequest request) { return getCorpusCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets corpus details inside a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getCorpusCallable().futureCall(request);
   *   // Do something.
   *   Corpus response = future.get();
   * }
   * }
*/ public final UnaryCallable getCorpusCallable() { return stub.getCorpusCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a corpus in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param corpus Required. The corpus which replaces the resource on the server. * @param updateMask The list of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Corpus updateCorpus(Corpus corpus, FieldMask updateMask) { UpdateCorpusRequest request = UpdateCorpusRequest.newBuilder().setCorpus(corpus).setUpdateMask(updateMask).build(); return updateCorpus(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a corpus in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Corpus updateCorpus(UpdateCorpusRequest request) { return updateCorpusCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a corpus in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateCorpusCallable().futureCall(request);
   *   // Do something.
   *   Corpus response = future.get();
   * }
   * }
*/ public final UnaryCallable updateCorpusCallable() { return stub.updateCorpusCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all corpora in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The resource name of the project from which to list corpora. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCorporaPagedResponse listCorpora(String parent) { ListCorporaRequest request = ListCorporaRequest.newBuilder().setParent(parent).build(); return listCorpora(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all corpora in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCorporaPagedResponse listCorpora(ListCorporaRequest request) { return listCorporaPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all corpora in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.listCorporaPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Corpus element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listCorporaPagedCallable() { return stub.listCorporaPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all corpora in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listCorporaCallable() { return stub.listCorporaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a corpus only if its empty. Returns empty response. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The resource name of the corpus to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteCorpus(CorpusName name) { DeleteCorpusRequest request = DeleteCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteCorpus(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a corpus only if its empty. Returns empty response. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The resource name of the corpus to delete. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteCorpus(String name) { DeleteCorpusRequest request = DeleteCorpusRequest.newBuilder().setName(name).build(); deleteCorpus(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a corpus only if its empty. Returns empty response. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteCorpus(DeleteCorpusRequest request) { deleteCorpusCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a corpus only if its empty. Returns empty response. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteCorpusCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteCorpusCallable() { return stub.deleteCorpusCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyzes a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture analyzeCorpusAsync( AnalyzeCorpusRequest request) { return analyzeCorpusOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyzes a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.analyzeCorpusOperationCallable().futureCall(request);
   *   // Do something.
   *   AnalyzeCorpusResponse response = future.get();
   * }
   * }
*/ public final OperationCallable analyzeCorpusOperationCallable() { return stub.analyzeCorpusOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Analyzes a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.analyzeCorpusCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable analyzeCorpusCallable() { return stub.analyzeCorpusCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this data schema will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param dataSchema Required. The data schema to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema createDataSchema(CorpusName parent, DataSchema dataSchema) { CreateDataSchemaRequest request = CreateDataSchemaRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setDataSchema(dataSchema) .build(); return createDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this data schema will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param dataSchema Required. The data schema to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema createDataSchema(String parent, DataSchema dataSchema) { CreateDataSchemaRequest request = CreateDataSchemaRequest.newBuilder().setParent(parent).setDataSchema(dataSchema).build(); return createDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema createDataSchema(CreateDataSchemaRequest request) { return createDataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createDataSchemaCallable().futureCall(request);
   *   // Do something.
   *   DataSchema response = future.get();
   * }
   * }
*/ public final UnaryCallable createDataSchemaCallable() { return stub.createDataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema updateDataSchema(DataSchema dataSchema, FieldMask updateMask) { UpdateDataSchemaRequest request = UpdateDataSchemaRequest.newBuilder() .setDataSchema(dataSchema) .setUpdateMask(updateMask) .build(); return updateDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema updateDataSchema(UpdateDataSchemaRequest request) { return updateDataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateDataSchemaCallable().futureCall(request);
   *   // Do something.
   *   DataSchema response = future.get();
   * }
   * }
*/ public final UnaryCallable updateDataSchemaCallable() { return stub.updateDataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the data schema to retrieve. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema getDataSchema(DataSchemaName name) { GetDataSchemaRequest request = GetDataSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the data schema to retrieve. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema getDataSchema(String name) { GetDataSchemaRequest request = GetDataSchemaRequest.newBuilder().setName(name).build(); return getDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DataSchema getDataSchema(GetDataSchemaRequest request) { return getDataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getDataSchemaCallable().futureCall(request);
   *   // Do something.
   *   DataSchema response = future.get();
   * }
   * }
*/ public final UnaryCallable getDataSchemaCallable() { return stub.getDataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the data schema to delete. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteDataSchema(DataSchemaName name) { DeleteDataSchemaRequest request = DeleteDataSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the data schema to delete. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteDataSchema(String name) { DeleteDataSchemaRequest request = DeleteDataSchemaRequest.newBuilder().setName(name).build(); deleteDataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteDataSchema(DeleteDataSchemaRequest request) { deleteDataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes data schema inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteDataSchemaCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteDataSchemaCallable() { return stub.deleteDataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of data schemas inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of data schemas. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDataSchemasPagedResponse listDataSchemas(CorpusName parent) { ListDataSchemasRequest request = ListDataSchemasRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listDataSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of data schemas inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of data schemas. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDataSchemasPagedResponse listDataSchemas(String parent) { ListDataSchemasRequest request = ListDataSchemasRequest.newBuilder().setParent(parent).build(); return listDataSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of data schemas inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDataSchemasPagedResponse listDataSchemas(ListDataSchemasRequest request) { return listDataSchemasPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of data schemas inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listDataSchemasPagedCallable().futureCall(request);
   *   // Do something.
   *   for (DataSchema element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listDataSchemasPagedCallable() { return stub.listDataSchemasPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of data schemas inside corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listDataSchemasCallable() { return stub.listDataSchemasCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this annotation will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` * @param annotation Required. The annotation to create. * @param annotationId Optional. The ID to use for the annotation, which will become the final * component of the annotation's resource name if user choose to specify. Otherwise, * annotation id will be generated by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation createAnnotation( AssetName parent, Annotation annotation, String annotationId) { CreateAnnotationRequest request = CreateAnnotationRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setAnnotation(annotation) .setAnnotationId(annotationId) .build(); return createAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this annotation will be created. Format: * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` * @param annotation Required. The annotation to create. * @param annotationId Optional. The ID to use for the annotation, which will become the final * component of the annotation's resource name if user choose to specify. Otherwise, * annotation id will be generated by system. *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation createAnnotation( String parent, Annotation annotation, String annotationId) { CreateAnnotationRequest request = CreateAnnotationRequest.newBuilder() .setParent(parent) .setAnnotation(annotation) .setAnnotationId(annotationId) .build(); return createAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation createAnnotation(CreateAnnotationRequest request) { return createAnnotationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createAnnotationCallable().futureCall(request);
   *   // Do something.
   *   Annotation response = future.get();
   * }
   * }
*/ public final UnaryCallable createAnnotationCallable() { return stub.createAnnotationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the annotation to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation getAnnotation(AnnotationName name) { GetAnnotationRequest request = GetAnnotationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the annotation to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation getAnnotation(String name) { GetAnnotationRequest request = GetAnnotationRequest.newBuilder().setName(name).build(); return getAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation getAnnotation(GetAnnotationRequest request) { return getAnnotationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Reads annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getAnnotationCallable().futureCall(request);
   *   // Do something.
   *   Annotation response = future.get();
   * }
   * }
*/ public final UnaryCallable getAnnotationCallable() { return stub.getAnnotationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of annotations inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent The parent, which owns this collection of annotations. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAnnotationsPagedResponse listAnnotations(AssetName parent) { ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listAnnotations(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of annotations inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent The parent, which owns this collection of annotations. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAnnotationsPagedResponse listAnnotations(String parent) { ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder().setParent(parent).build(); return listAnnotations(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of annotations inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request) { return listAnnotationsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of annotations inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listAnnotationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Annotation element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listAnnotationsPagedCallable() { return stub.listAnnotationsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists a list of annotations inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listAnnotationsCallable() { return stub.listAnnotationsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation updateAnnotation(Annotation annotation, FieldMask updateMask) { UpdateAnnotationRequest request = UpdateAnnotationRequest.newBuilder() .setAnnotation(annotation) .setUpdateMask(updateMask) .build(); return updateAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Annotation updateAnnotation(UpdateAnnotationRequest request) { return updateAnnotationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateAnnotationCallable().futureCall(request);
   *   // Do something.
   *   Annotation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateAnnotationCallable() { return stub.updateAnnotationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the annotation to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteAnnotation(AnnotationName name) { DeleteAnnotationRequest request = DeleteAnnotationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the annotation to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteAnnotation(String name) { DeleteAnnotationRequest request = DeleteAnnotationRequest.newBuilder().setName(name).build(); deleteAnnotation(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteAnnotation(DeleteAnnotationRequest request) { deleteAnnotationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes annotation inside asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteAnnotationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteAnnotationCallable() { return stub.deleteAnnotationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired * according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional * streaming is not supported via HTTP). * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 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 BidiStreamingCallable ingestAssetCallable() { return stub.ingestAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Supported by STREAM_VIDEO corpus type. Generates clips for downloading. The api takes in a time * range, and generates a clip of the first content available after start_time and before * end_time, which may overflow beyond these bounds. Returned clips are truncated if the total * size of the clips are larger than 100MB. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ClipAssetResponse clipAsset(ClipAssetRequest request) { return clipAssetCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Supported by STREAM_VIDEO corpus type. Generates clips for downloading. The api takes in a time * range, and generates a clip of the first content available after start_time and before * end_time, which may overflow beyond these bounds. Returned clips are truncated if the total * size of the clips are larger than 100MB. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.clipAssetCallable().futureCall(request);
   *   // Do something.
   *   ClipAssetResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable clipAssetCallable() { return stub.clipAssetCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and * generates a URI for an HLS manifest that covers all the requested time ranges. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .setLiveViewEnabled(true)
   *           .build();
   *   GenerateHlsUriResponse response = warehouseClient.generateHlsUri(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GenerateHlsUriResponse generateHlsUri(GenerateHlsUriRequest request) { return generateHlsUriCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and * generates a URI for an HLS manifest that covers all the requested time ranges. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .setLiveViewEnabled(true)
   *           .build();
   *   ApiFuture future =
   *       warehouseClient.generateHlsUriCallable().futureCall(request);
   *   // Do something.
   *   GenerateHlsUriResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable generateHlsUriCallable() { return stub.generateHlsUriCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture importAssetsAsync( ImportAssetsRequest request) { return importAssetsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.importAssetsOperationCallable().futureCall(request);
   *   // Do something.
   *   ImportAssetsResponse response = future.get();
   * }
   * }
*/ public final OperationCallable importAssetsOperationCallable() { return stub.importAssetsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.importAssetsCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable importAssetsCallable() { return stub.importAssetsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a search configuration inside a corpus. * *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. * Request must contain at least one non-empty search_criteria_property or facet_property. 3. * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields * must share the same semantic SearchConfig match options. For property-specific rules, please * reference the comments for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this search configuration will be created. * Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param searchConfig Required. The search config to create. * @param searchConfigId Required. ID to use for the new search config. Will become the final * component of the SearchConfig's resource name. This value should be up to 63 characters, * and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last * could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig createSearchConfig( CorpusName parent, SearchConfig searchConfig, String searchConfigId) { CreateSearchConfigRequest request = CreateSearchConfigRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setSearchConfig(searchConfig) .setSearchConfigId(searchConfigId) .build(); return createSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a search configuration inside a corpus. * *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. * Request must contain at least one non-empty search_criteria_property or facet_property. 3. * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields * must share the same semantic SearchConfig match options. For property-specific rules, please * reference the comments for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this search configuration will be created. * Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` * @param searchConfig Required. The search config to create. * @param searchConfigId Required. ID to use for the new search config. Will become the final * component of the SearchConfig's resource name. This value should be up to 63 characters, * and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last * could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig createSearchConfig( String parent, SearchConfig searchConfig, String searchConfigId) { CreateSearchConfigRequest request = CreateSearchConfigRequest.newBuilder() .setParent(parent) .setSearchConfig(searchConfig) .setSearchConfigId(searchConfigId) .build(); return createSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a search configuration inside a corpus. * *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. * Request must contain at least one non-empty search_criteria_property or facet_property. 3. * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields * must share the same semantic SearchConfig match options. For property-specific rules, please * reference the comments for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig createSearchConfig(CreateSearchConfigRequest request) { return createSearchConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a search configuration inside a corpus. * *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. * Request must contain at least one non-empty search_criteria_property or facet_property. 3. * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields * must share the same semantic SearchConfig match options. For property-specific rules, please * reference the comments for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createSearchConfigCallable().futureCall(request);
   *   // Do something.
   *   SearchConfig response = future.get();
   * }
   * }
*/ public final UnaryCallable createSearchConfigCallable() { return stub.createSearchConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a search configuration inside a corpus. * *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All * mapped_fields must share the same granularity. 6. All mapped_fields must share the same * semantic SearchConfig match options. For property-specific rules, please reference the comments * for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. If left unset, all field paths will be * updated/overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask) { UpdateSearchConfigRequest request = UpdateSearchConfigRequest.newBuilder() .setSearchConfig(searchConfig) .setUpdateMask(updateMask) .build(); return updateSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a search configuration inside a corpus. * *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All * mapped_fields must share the same granularity. 6. All mapped_fields must share the same * semantic SearchConfig match options. For property-specific rules, please reference the comments * for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig updateSearchConfig(UpdateSearchConfigRequest request) { return updateSearchConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a search configuration inside a corpus. * *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All * mapped_fields must share the same granularity. 6. All mapped_fields must share the same * semantic SearchConfig match options. For property-specific rules, please reference the comments * for FacetProperty and SearchCriteriaProperty. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.updateSearchConfigCallable().futureCall(request);
   *   // Do something.
   *   SearchConfig response = future.get();
   * }
   * }
*/ public final UnaryCallable updateSearchConfigCallable() { return stub.updateSearchConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a search configuration inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the search configuration to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig getSearchConfig(SearchConfigName name) { GetSearchConfigRequest request = GetSearchConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a search configuration inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the search configuration to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig getSearchConfig(String name) { GetSearchConfigRequest request = GetSearchConfigRequest.newBuilder().setName(name).build(); return getSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a search configuration inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchConfig getSearchConfig(GetSearchConfigRequest request) { return getSearchConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a search configuration inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.getSearchConfigCallable().futureCall(request);
   *   // Do something.
   *   SearchConfig response = future.get();
   * }
   * }
*/ public final UnaryCallable getSearchConfigCallable() { return stub.getSearchConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a search configuration inside a corpus. * *

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

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the search configuration to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchConfig(SearchConfigName name) { DeleteSearchConfigRequest request = DeleteSearchConfigRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); deleteSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a search configuration inside a corpus. * *

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

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the search configuration to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchConfig(String name) { DeleteSearchConfigRequest request = DeleteSearchConfigRequest.newBuilder().setName(name).build(); deleteSearchConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a search configuration inside a corpus. * *

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

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchConfig(DeleteSearchConfigRequest request) { deleteSearchConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a search configuration inside a corpus. * *

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

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteSearchConfigCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteSearchConfigCallable() { return stub.deleteSearchConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all search configurations inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of search configurations. * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchConfigsPagedResponse listSearchConfigs(CorpusName parent) { ListSearchConfigsRequest request = ListSearchConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listSearchConfigs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all search configurations inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of search configurations. * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchConfigsPagedResponse listSearchConfigs(String parent) { ListSearchConfigsRequest request = ListSearchConfigsRequest.newBuilder().setParent(parent).build(); return listSearchConfigs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all search configurations inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchConfigsPagedResponse listSearchConfigs(ListSearchConfigsRequest request) { return listSearchConfigsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all search configurations inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listSearchConfigsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (SearchConfig element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listSearchConfigsPagedCallable() { return stub.listSearchConfigsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all search configurations inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listSearchConfigsCallable() { return stub.listSearchConfigsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this SearchHypernym will be created. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @param searchHypernym Required. The SearchHypernym to create. * @param searchHypernymId Optional. The search hypernym id. If omitted, a random UUID will be * generated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym createSearchHypernym( CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId) { CreateSearchHypernymRequest request = CreateSearchHypernymRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setSearchHypernym(searchHypernym) .setSearchHypernymId(searchHypernymId) .build(); return createSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param parent Required. The parent resource where this SearchHypernym will be created. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @param searchHypernym Required. The SearchHypernym to create. * @param searchHypernymId Optional. The search hypernym id. If omitted, a random UUID will be * generated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym createSearchHypernym( String parent, SearchHypernym searchHypernym, String searchHypernymId) { CreateSearchHypernymRequest request = CreateSearchHypernymRequest.newBuilder() .setParent(parent) .setSearchHypernym(searchHypernym) .setSearchHypernymId(searchHypernymId) .build(); return createSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym createSearchHypernym(CreateSearchHypernymRequest request) { return createSearchHypernymCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createSearchHypernymCallable().futureCall(request);
   *   // Do something.
   *   SearchHypernym response = future.get();
   * }
   * }
*/ public final UnaryCallable createSearchHypernymCallable() { return stub.createSearchHypernymCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. If left unset, all field paths will be * updated/overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym updateSearchHypernym( SearchHypernym searchHypernym, FieldMask updateMask) { UpdateSearchHypernymRequest request = UpdateSearchHypernymRequest.newBuilder() .setSearchHypernym(searchHypernym) .setUpdateMask(updateMask) .build(); return updateSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym updateSearchHypernym(UpdateSearchHypernymRequest request) { return updateSearchHypernymCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.updateSearchHypernymCallable().futureCall(request);
   *   // Do something.
   *   SearchHypernym response = future.get();
   * }
   * }
*/ public final UnaryCallable updateSearchHypernymCallable() { return stub.updateSearchHypernymCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the SearchHypernym to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym getSearchHypernym(SearchHypernymName name) { GetSearchHypernymRequest request = GetSearchHypernymRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the SearchHypernym to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym getSearchHypernym(String name) { GetSearchHypernymRequest request = GetSearchHypernymRequest.newBuilder().setName(name).build(); return getSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchHypernym getSearchHypernym(GetSearchHypernymRequest request) { return getSearchHypernymCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.getSearchHypernymCallable().futureCall(request);
   *   // Do something.
   *   SearchHypernym response = future.get();
   * }
   * }
*/ public final UnaryCallable getSearchHypernymCallable() { return stub.getSearchHypernymCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the SearchHypernym to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchHypernym(SearchHypernymName name) { DeleteSearchHypernymRequest request = DeleteSearchHypernymRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); deleteSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the SearchHypernym to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchHypernym(String name) { DeleteSearchHypernymRequest request = DeleteSearchHypernymRequest.newBuilder().setName(name).build(); deleteSearchHypernym(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSearchHypernym(DeleteSearchHypernymRequest request) { deleteSearchHypernymCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a SearchHypernym inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteSearchHypernymCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteSearchHypernymCallable() { return stub.deleteSearchHypernymCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SearchHypernyms inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of SearchHypernyms. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchHypernymsPagedResponse listSearchHypernyms(CorpusName parent) { ListSearchHypernymsRequest request = ListSearchHypernymsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listSearchHypernyms(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SearchHypernyms inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of SearchHypernyms. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchHypernymsPagedResponse listSearchHypernyms(String parent) { ListSearchHypernymsRequest request = ListSearchHypernymsRequest.newBuilder().setParent(parent).build(); return listSearchHypernyms(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SearchHypernyms inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSearchHypernymsPagedResponse listSearchHypernyms( ListSearchHypernymsRequest request) { return listSearchHypernymsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SearchHypernyms inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listSearchHypernymsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (SearchHypernym element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listSearchHypernymsPagedCallable() { return stub.listSearchHypernymsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists SearchHypernyms inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listSearchHypernymsCallable() { return stub.listSearchHypernymsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search media asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllFacetSelections(new ArrayList())
   *           .addAllResultAnnotationKeys(new ArrayList())
   *           .setSearchQuery("searchQuery-552137728")
   *           .build();
   *   for (SearchResultItem element : warehouseClient.searchAssets(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAssetsPagedResponse searchAssets(SearchAssetsRequest request) { return searchAssetsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search media asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllFacetSelections(new ArrayList())
   *           .addAllResultAnnotationKeys(new ArrayList())
   *           .setSearchQuery("searchQuery-552137728")
   *           .build();
   *   ApiFuture future =
   *       warehouseClient.searchAssetsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (SearchResultItem element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable searchAssetsPagedCallable() { return stub.searchAssetsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search media asset. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllFacetSelections(new ArrayList())
   *           .addAllResultAnnotationKeys(new ArrayList())
   *           .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 UnaryCallable searchAssetsCallable() { return stub.searchAssetsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search a deployed index endpoint (IMAGE corpus type only). * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllExclusionCriteria(new ArrayList())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (SearchResultItem element : warehouseClient.searchIndexEndpoint(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchIndexEndpointPagedResponse searchIndexEndpoint( SearchIndexEndpointRequest request) { return searchIndexEndpointPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search a deployed index endpoint (IMAGE corpus type only). * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllExclusionCriteria(new ArrayList())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       warehouseClient.searchIndexEndpointPagedCallable().futureCall(request);
   *   // Do something.
   *   for (SearchResultItem element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable searchIndexEndpointPagedCallable() { return stub.searchIndexEndpointPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search a deployed index endpoint (IMAGE corpus type only). * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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())
   *           .addAllExclusionCriteria(new ArrayList())
   *           .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 UnaryCallable searchIndexEndpointCallable() { return stub.searchIndexEndpointCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param parent Required. Format: `projects/{project}/locations/{location}` * @param indexEndpoint Required. The resource being created. * @param indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the * final component of the IndexEndpoint's resource name if the user specifies it. Otherwise, * IndexEndpoint id will be autogenerated. *

This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash * (-). The first character must be a letter, the last must be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexEndpointAsync( LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId) { CreateIndexEndpointRequest request = CreateIndexEndpointRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setIndexEndpoint(indexEndpoint) .setIndexEndpointId(indexEndpointId) .build(); return createIndexEndpointAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param parent Required. Format: `projects/{project}/locations/{location}` * @param indexEndpoint Required. The resource being created. * @param indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the * final component of the IndexEndpoint's resource name if the user specifies it. Otherwise, * IndexEndpoint id will be autogenerated. *

This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash * (-). The first character must be a letter, the last must be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexEndpointAsync( String parent, IndexEndpoint indexEndpoint, String indexEndpointId) { CreateIndexEndpointRequest request = CreateIndexEndpointRequest.newBuilder() .setParent(parent) .setIndexEndpoint(indexEndpoint) .setIndexEndpointId(indexEndpointId) .build(); return createIndexEndpointAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createIndexEndpointAsync( CreateIndexEndpointRequest request) { return createIndexEndpointOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createIndexEndpointOperationCallable().futureCall(request);
   *   // Do something.
   *   IndexEndpoint response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> createIndexEndpointOperationCallable() { return stub.createIndexEndpointOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createIndexEndpointCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createIndexEndpointCallable() { return stub.createIndexEndpointCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. Name of the IndexEndpoint resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final IndexEndpoint getIndexEndpoint(IndexEndpointName name) { GetIndexEndpointRequest request = GetIndexEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getIndexEndpoint(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. Name of the IndexEndpoint resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final IndexEndpoint getIndexEndpoint(String name) { GetIndexEndpointRequest request = GetIndexEndpointRequest.newBuilder().setName(name).build(); return getIndexEndpoint(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final IndexEndpoint getIndexEndpoint(GetIndexEndpointRequest request) { return getIndexEndpointCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.getIndexEndpointCallable().futureCall(request);
   *   // Do something.
   *   IndexEndpoint response = future.get();
   * }
   * }
*/ public final UnaryCallable getIndexEndpointCallable() { return stub.getIndexEndpointCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all IndexEndpoints in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexEndpointsPagedResponse listIndexEndpoints(LocationName parent) { ListIndexEndpointsRequest request = ListIndexEndpointsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listIndexEndpoints(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all IndexEndpoints in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. Format: `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexEndpointsPagedResponse listIndexEndpoints(String parent) { ListIndexEndpointsRequest request = ListIndexEndpointsRequest.newBuilder().setParent(parent).build(); return listIndexEndpoints(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all IndexEndpoints in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIndexEndpointsPagedResponse listIndexEndpoints( ListIndexEndpointsRequest request) { return listIndexEndpointsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all IndexEndpoints in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listIndexEndpointsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (IndexEndpoint element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listIndexEndpointsPagedCallable() { return stub.listIndexEndpointsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all IndexEndpoints in a project. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listIndexEndpointsCallable() { return stub.listIndexEndpointsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param indexEndpoint Required. The resource being updated. * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the * IndexEndpoint resource by the update. The fields specified in the update_mask are relative * to the resource, not the full request. A field of the resource will be overwritten if it is * in the mask. Empty field mask is not allowed. If the mask is "*", then this is a full * replacement of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateIndexEndpointAsync( IndexEndpoint indexEndpoint, FieldMask updateMask) { UpdateIndexEndpointRequest request = UpdateIndexEndpointRequest.newBuilder() .setIndexEndpoint(indexEndpoint) .setUpdateMask(updateMask) .build(); return updateIndexEndpointAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateIndexEndpointAsync( UpdateIndexEndpointRequest request) { return updateIndexEndpointOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.updateIndexEndpointOperationCallable().futureCall(request);
   *   // Do something.
   *   IndexEndpoint response = future.get();
   * }
   * }
*/ public final OperationCallable< UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> updateIndexEndpointOperationCallable() { return stub.updateIndexEndpointOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.updateIndexEndpointCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateIndexEndpointCallable() { return stub.updateIndexEndpointCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexEndpointAsync( IndexEndpointName name) { DeleteIndexEndpointRequest request = DeleteIndexEndpointRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteIndexEndpointAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. Name of the resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexEndpointAsync( String name) { DeleteIndexEndpointRequest request = DeleteIndexEndpointRequest.newBuilder().setName(name).build(); return deleteIndexEndpointAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteIndexEndpointAsync( DeleteIndexEndpointRequest request) { return deleteIndexEndpointOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deleteIndexEndpointOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteIndexEndpointOperationCallable() { return stub.deleteIndexEndpointOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deleteIndexEndpointCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteIndexEndpointCallable() { return stub.deleteIndexEndpointCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys an Index to IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deployIndexAsync( DeployIndexRequest request) { return deployIndexOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys an Index to IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deployIndexOperationCallable().futureCall(request);
   *   // Do something.
   *   DeployIndexResponse response = future.get();
   * }
   * }
*/ public final OperationCallable deployIndexOperationCallable() { return stub.deployIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deploys an Index to IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deployIndexCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable deployIndexCallable() { return stub.deployIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys an Index from IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture undeployIndexAsync( UndeployIndexRequest request) { return undeployIndexOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys an Index from IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.undeployIndexOperationCallable().futureCall(request);
   *   // Do something.
   *   UndeployIndexResponse response = future.get();
   * }
   * }
*/ public final OperationCallable undeployIndexOperationCallable() { return stub.undeployIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Undeploys an Index from IndexEndpoint. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.undeployIndexCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable undeployIndexCallable() { return stub.undeployIndexCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param parent Required. The parent resource where this collection will be created. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @param collection Required. The collection resource to be created. * @param collectionId Optional. The ID to use for the collection, which will become the final * component of the resource name if user choose to specify. Otherwise, collection id will be * generated by system. *

This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCollectionAsync( CorpusName parent, Collection collection, String collectionId) { CreateCollectionRequest request = CreateCollectionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCollection(collection) .setCollectionId(collectionId) .build(); return createCollectionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param parent Required. The parent resource where this collection will be created. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @param collection Required. The collection resource to be created. * @param collectionId Optional. The ID to use for the collection, which will become the final * component of the resource name if user choose to specify. Otherwise, collection id will be * generated by system. *

This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The * first character must be a letter, the last could be a letter or a number. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCollectionAsync( String parent, Collection collection, String collectionId) { CreateCollectionRequest request = CreateCollectionRequest.newBuilder() .setParent(parent) .setCollection(collection) .setCollectionId(collectionId) .build(); return createCollectionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCollectionAsync( CreateCollectionRequest request) { return createCollectionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.createCollectionOperationCallable().futureCall(request);
   *   // Do something.
   *   Collection response = future.get();
   * }
   * }
*/ public final OperationCallable createCollectionOperationCallable() { return stub.createCollectionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.createCollectionCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createCollectionCallable() { return stub.createCollectionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the collection to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteCollectionAsync( CollectionName name) { DeleteCollectionRequest request = DeleteCollectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteCollectionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param name Required. The name of the collection to delete. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteCollectionAsync(String name) { DeleteCollectionRequest request = DeleteCollectionRequest.newBuilder().setName(name).build(); return deleteCollectionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteCollectionAsync( DeleteCollectionRequest request) { return deleteCollectionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.deleteCollectionOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteCollectionOperationCallable() { return stub.deleteCollectionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.deleteCollectionCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteCollectionCallable() { return stub.deleteCollectionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the collection to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Collection getCollection(CollectionName name) { GetCollectionRequest request = GetCollectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getCollection(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param name Required. The name of the collection to retrieve. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Collection getCollection(String name) { GetCollectionRequest request = GetCollectionRequest.newBuilder().setName(name).build(); return getCollection(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Collection getCollection(GetCollectionRequest request) { return getCollectionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.getCollectionCallable().futureCall(request);
   *   // Do something.
   *   Collection response = future.get();
   * }
   * }
*/ public final UnaryCallable getCollectionCallable() { return stub.getCollectionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param 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}` * @param updateMask The list of fields to be updated. - Unset `update_mask` or set `update_mask` * to be a single "*" only will update all updatable fields with the value provided in * `collection`. - To update `display_name` value to empty string, set it in the `collection` * to empty string, and set `update_mask` with "display_name". Same applies to other updatable * string fields in the `collection`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Collection updateCollection(Collection collection, FieldMask updateMask) { UpdateCollectionRequest request = UpdateCollectionRequest.newBuilder() .setCollection(collection) .setUpdateMask(updateMask) .build(); return updateCollection(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Collection updateCollection(UpdateCollectionRequest request) { return updateCollectionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future = warehouseClient.updateCollectionCallable().futureCall(request);
   *   // Do something.
   *   Collection response = future.get();
   * }
   * }
*/ public final UnaryCallable updateCollectionCallable() { return stub.updateCollectionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists collections inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent corpus. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCollectionsPagedResponse listCollections(CorpusName parent) { ListCollectionsRequest request = ListCollectionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listCollections(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists collections inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param parent Required. The parent corpus. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCollectionsPagedResponse listCollections(String parent) { ListCollectionsRequest request = ListCollectionsRequest.newBuilder().setParent(parent).build(); return listCollections(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists collections inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCollectionsPagedResponse listCollections(ListCollectionsRequest request) { return listCollectionsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists collections inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.listCollectionsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Collection element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listCollectionsPagedCallable() { return stub.listCollectionsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists collections inside a corpus. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable listCollectionsCallable() { return stub.listCollectionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds an item into a Collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param item Required. The item to be added. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddCollectionItemResponse addCollectionItem(CollectionItem item) { AddCollectionItemRequest request = AddCollectionItemRequest.newBuilder().setItem(item).build(); return addCollectionItem(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds an item into a Collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddCollectionItemResponse addCollectionItem(AddCollectionItemRequest request) { return addCollectionItemCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds an item into a Collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.addCollectionItemCallable().futureCall(request);
   *   // Do something.
   *   AddCollectionItemResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable addCollectionItemCallable() { return stub.addCollectionItemCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes an item from a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param item Required. The item to be removed. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RemoveCollectionItemResponse removeCollectionItem(CollectionItem item) { RemoveCollectionItemRequest request = RemoveCollectionItemRequest.newBuilder().setItem(item).build(); return removeCollectionItem(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes an item from a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RemoveCollectionItemResponse removeCollectionItem( RemoveCollectionItemRequest request) { return removeCollectionItemCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes an item from a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.removeCollectionItemCallable().futureCall(request);
   *   // Do something.
   *   RemoveCollectionItemResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable removeCollectionItemCallable() { return stub.removeCollectionItemCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * View items inside a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param collection Required. The collection to view. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewCollectionItemsPagedResponse viewCollectionItems(CollectionName collection) { ViewCollectionItemsRequest request = ViewCollectionItemsRequest.newBuilder() .setCollection(collection == null ? null : collection.toString()) .build(); return viewCollectionItems(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * View items inside a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param collection Required. The collection to view. Format: * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewCollectionItemsPagedResponse viewCollectionItems(String collection) { ViewCollectionItemsRequest request = ViewCollectionItemsRequest.newBuilder().setCollection(collection).build(); return viewCollectionItems(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * View items inside a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ViewCollectionItemsPagedResponse viewCollectionItems( ViewCollectionItemsRequest request) { return viewCollectionItemsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * View items inside a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 future =
   *       warehouseClient.viewCollectionItemsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (CollectionItem element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable viewCollectionItemsPagedCallable() { return stub.viewCollectionItemsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * View items inside a collection. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating 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 UnaryCallable viewCollectionItemsCallable() { return stub.viewCollectionItemsCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListAssetsPagedResponse extends AbstractPagedListResponse< ListAssetsRequest, ListAssetsResponse, Asset, ListAssetsPage, ListAssetsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); } private ListAssetsPagedResponse(ListAssetsPage page) { super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); } } public static class ListAssetsPage extends AbstractPage { private ListAssetsPage( PageContext context, ListAssetsResponse response) { super(context, response); } private static ListAssetsPage createEmptyPage() { return new ListAssetsPage(null, null); } @Override protected ListAssetsPage createPage( PageContext context, ListAssetsResponse response) { return new ListAssetsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListAssetsFixedSizeCollection extends AbstractFixedSizeCollection< ListAssetsRequest, ListAssetsResponse, Asset, ListAssetsPage, ListAssetsFixedSizeCollection> { private ListAssetsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListAssetsFixedSizeCollection createEmptyCollection() { return new ListAssetsFixedSizeCollection(null, 0); } @Override protected ListAssetsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListAssetsFixedSizeCollection(pages, collectionSize); } } public static class ViewIndexedAssetsPagedResponse extends AbstractPagedListResponse< ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, IndexedAsset, ViewIndexedAssetsPage, ViewIndexedAssetsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ViewIndexedAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ViewIndexedAssetsPagedResponse(input), MoreExecutors.directExecutor()); } private ViewIndexedAssetsPagedResponse(ViewIndexedAssetsPage page) { super(page, ViewIndexedAssetsFixedSizeCollection.createEmptyCollection()); } } public static class ViewIndexedAssetsPage extends AbstractPage< ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, IndexedAsset, ViewIndexedAssetsPage> { private ViewIndexedAssetsPage( PageContext context, ViewIndexedAssetsResponse response) { super(context, response); } private static ViewIndexedAssetsPage createEmptyPage() { return new ViewIndexedAssetsPage(null, null); } @Override protected ViewIndexedAssetsPage createPage( PageContext context, ViewIndexedAssetsResponse response) { return new ViewIndexedAssetsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ViewIndexedAssetsFixedSizeCollection extends AbstractFixedSizeCollection< ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, IndexedAsset, ViewIndexedAssetsPage, ViewIndexedAssetsFixedSizeCollection> { private ViewIndexedAssetsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ViewIndexedAssetsFixedSizeCollection createEmptyCollection() { return new ViewIndexedAssetsFixedSizeCollection(null, 0); } @Override protected ViewIndexedAssetsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ViewIndexedAssetsFixedSizeCollection(pages, collectionSize); } } public static class ListIndexesPagedResponse extends AbstractPagedListResponse< ListIndexesRequest, ListIndexesResponse, Index, ListIndexesPage, ListIndexesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListIndexesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListIndexesPagedResponse(input), MoreExecutors.directExecutor()); } private ListIndexesPagedResponse(ListIndexesPage page) { super(page, ListIndexesFixedSizeCollection.createEmptyCollection()); } } public static class ListIndexesPage extends AbstractPage { private ListIndexesPage( PageContext context, ListIndexesResponse response) { super(context, response); } private static ListIndexesPage createEmptyPage() { return new ListIndexesPage(null, null); } @Override protected ListIndexesPage createPage( PageContext context, ListIndexesResponse response) { return new ListIndexesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListIndexesFixedSizeCollection extends AbstractFixedSizeCollection< ListIndexesRequest, ListIndexesResponse, Index, ListIndexesPage, ListIndexesFixedSizeCollection> { private ListIndexesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListIndexesFixedSizeCollection createEmptyCollection() { return new ListIndexesFixedSizeCollection(null, 0); } @Override protected ListIndexesFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListIndexesFixedSizeCollection(pages, collectionSize); } } public static class ListCorporaPagedResponse extends AbstractPagedListResponse< ListCorporaRequest, ListCorporaResponse, Corpus, ListCorporaPage, ListCorporaFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListCorporaPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListCorporaPagedResponse(input), MoreExecutors.directExecutor()); } private ListCorporaPagedResponse(ListCorporaPage page) { super(page, ListCorporaFixedSizeCollection.createEmptyCollection()); } } public static class ListCorporaPage extends AbstractPage { private ListCorporaPage( PageContext context, ListCorporaResponse response) { super(context, response); } private static ListCorporaPage createEmptyPage() { return new ListCorporaPage(null, null); } @Override protected ListCorporaPage createPage( PageContext context, ListCorporaResponse response) { return new ListCorporaPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListCorporaFixedSizeCollection extends AbstractFixedSizeCollection< ListCorporaRequest, ListCorporaResponse, Corpus, ListCorporaPage, ListCorporaFixedSizeCollection> { private ListCorporaFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListCorporaFixedSizeCollection createEmptyCollection() { return new ListCorporaFixedSizeCollection(null, 0); } @Override protected ListCorporaFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListCorporaFixedSizeCollection(pages, collectionSize); } } public static class ListDataSchemasPagedResponse extends AbstractPagedListResponse< ListDataSchemasRequest, ListDataSchemasResponse, DataSchema, ListDataSchemasPage, ListDataSchemasFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListDataSchemasPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListDataSchemasPagedResponse(input), MoreExecutors.directExecutor()); } private ListDataSchemasPagedResponse(ListDataSchemasPage page) { super(page, ListDataSchemasFixedSizeCollection.createEmptyCollection()); } } public static class ListDataSchemasPage extends AbstractPage< ListDataSchemasRequest, ListDataSchemasResponse, DataSchema, ListDataSchemasPage> { private ListDataSchemasPage( PageContext context, ListDataSchemasResponse response) { super(context, response); } private static ListDataSchemasPage createEmptyPage() { return new ListDataSchemasPage(null, null); } @Override protected ListDataSchemasPage createPage( PageContext context, ListDataSchemasResponse response) { return new ListDataSchemasPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListDataSchemasFixedSizeCollection extends AbstractFixedSizeCollection< ListDataSchemasRequest, ListDataSchemasResponse, DataSchema, ListDataSchemasPage, ListDataSchemasFixedSizeCollection> { private ListDataSchemasFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListDataSchemasFixedSizeCollection createEmptyCollection() { return new ListDataSchemasFixedSizeCollection(null, 0); } @Override protected ListDataSchemasFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListDataSchemasFixedSizeCollection(pages, collectionSize); } } public static class ListAnnotationsPagedResponse extends AbstractPagedListResponse< ListAnnotationsRequest, ListAnnotationsResponse, Annotation, ListAnnotationsPage, ListAnnotationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListAnnotationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListAnnotationsPagedResponse(input), MoreExecutors.directExecutor()); } private ListAnnotationsPagedResponse(ListAnnotationsPage page) { super(page, ListAnnotationsFixedSizeCollection.createEmptyCollection()); } } public static class ListAnnotationsPage extends AbstractPage< ListAnnotationsRequest, ListAnnotationsResponse, Annotation, ListAnnotationsPage> { private ListAnnotationsPage( PageContext context, ListAnnotationsResponse response) { super(context, response); } private static ListAnnotationsPage createEmptyPage() { return new ListAnnotationsPage(null, null); } @Override protected ListAnnotationsPage createPage( PageContext context, ListAnnotationsResponse response) { return new ListAnnotationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListAnnotationsFixedSizeCollection extends AbstractFixedSizeCollection< ListAnnotationsRequest, ListAnnotationsResponse, Annotation, ListAnnotationsPage, ListAnnotationsFixedSizeCollection> { private ListAnnotationsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListAnnotationsFixedSizeCollection createEmptyCollection() { return new ListAnnotationsFixedSizeCollection(null, 0); } @Override protected ListAnnotationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListAnnotationsFixedSizeCollection(pages, collectionSize); } } public static class ListSearchConfigsPagedResponse extends AbstractPagedListResponse< ListSearchConfigsRequest, ListSearchConfigsResponse, SearchConfig, ListSearchConfigsPage, ListSearchConfigsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListSearchConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListSearchConfigsPagedResponse(input), MoreExecutors.directExecutor()); } private ListSearchConfigsPagedResponse(ListSearchConfigsPage page) { super(page, ListSearchConfigsFixedSizeCollection.createEmptyCollection()); } } public static class ListSearchConfigsPage extends AbstractPage< ListSearchConfigsRequest, ListSearchConfigsResponse, SearchConfig, ListSearchConfigsPage> { private ListSearchConfigsPage( PageContext context, ListSearchConfigsResponse response) { super(context, response); } private static ListSearchConfigsPage createEmptyPage() { return new ListSearchConfigsPage(null, null); } @Override protected ListSearchConfigsPage createPage( PageContext context, ListSearchConfigsResponse response) { return new ListSearchConfigsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListSearchConfigsFixedSizeCollection extends AbstractFixedSizeCollection< ListSearchConfigsRequest, ListSearchConfigsResponse, SearchConfig, ListSearchConfigsPage, ListSearchConfigsFixedSizeCollection> { private ListSearchConfigsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListSearchConfigsFixedSizeCollection createEmptyCollection() { return new ListSearchConfigsFixedSizeCollection(null, 0); } @Override protected ListSearchConfigsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListSearchConfigsFixedSizeCollection(pages, collectionSize); } } public static class ListSearchHypernymsPagedResponse extends AbstractPagedListResponse< ListSearchHypernymsRequest, ListSearchHypernymsResponse, SearchHypernym, ListSearchHypernymsPage, ListSearchHypernymsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListSearchHypernymsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListSearchHypernymsPagedResponse(input), MoreExecutors.directExecutor()); } private ListSearchHypernymsPagedResponse(ListSearchHypernymsPage page) { super(page, ListSearchHypernymsFixedSizeCollection.createEmptyCollection()); } } public static class ListSearchHypernymsPage extends AbstractPage< ListSearchHypernymsRequest, ListSearchHypernymsResponse, SearchHypernym, ListSearchHypernymsPage> { private ListSearchHypernymsPage( PageContext context, ListSearchHypernymsResponse response) { super(context, response); } private static ListSearchHypernymsPage createEmptyPage() { return new ListSearchHypernymsPage(null, null); } @Override protected ListSearchHypernymsPage createPage( PageContext context, ListSearchHypernymsResponse response) { return new ListSearchHypernymsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListSearchHypernymsFixedSizeCollection extends AbstractFixedSizeCollection< ListSearchHypernymsRequest, ListSearchHypernymsResponse, SearchHypernym, ListSearchHypernymsPage, ListSearchHypernymsFixedSizeCollection> { private ListSearchHypernymsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListSearchHypernymsFixedSizeCollection createEmptyCollection() { return new ListSearchHypernymsFixedSizeCollection(null, 0); } @Override protected ListSearchHypernymsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListSearchHypernymsFixedSizeCollection(pages, collectionSize); } } public static class SearchAssetsPagedResponse extends AbstractPagedListResponse< SearchAssetsRequest, SearchAssetsResponse, SearchResultItem, SearchAssetsPage, SearchAssetsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = SearchAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new SearchAssetsPagedResponse(input), MoreExecutors.directExecutor()); } private SearchAssetsPagedResponse(SearchAssetsPage page) { super(page, SearchAssetsFixedSizeCollection.createEmptyCollection()); } } public static class SearchAssetsPage extends AbstractPage< SearchAssetsRequest, SearchAssetsResponse, SearchResultItem, SearchAssetsPage> { private SearchAssetsPage( PageContext context, SearchAssetsResponse response) { super(context, response); } private static SearchAssetsPage createEmptyPage() { return new SearchAssetsPage(null, null); } @Override protected SearchAssetsPage createPage( PageContext context, SearchAssetsResponse response) { return new SearchAssetsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class SearchAssetsFixedSizeCollection extends AbstractFixedSizeCollection< SearchAssetsRequest, SearchAssetsResponse, SearchResultItem, SearchAssetsPage, SearchAssetsFixedSizeCollection> { private SearchAssetsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static SearchAssetsFixedSizeCollection createEmptyCollection() { return new SearchAssetsFixedSizeCollection(null, 0); } @Override protected SearchAssetsFixedSizeCollection createCollection( List pages, int collectionSize) { return new SearchAssetsFixedSizeCollection(pages, collectionSize); } } public static class SearchIndexEndpointPagedResponse extends AbstractPagedListResponse< SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchResultItem, SearchIndexEndpointPage, SearchIndexEndpointFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = SearchIndexEndpointPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new SearchIndexEndpointPagedResponse(input), MoreExecutors.directExecutor()); } private SearchIndexEndpointPagedResponse(SearchIndexEndpointPage page) { super(page, SearchIndexEndpointFixedSizeCollection.createEmptyCollection()); } } public static class SearchIndexEndpointPage extends AbstractPage< SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchResultItem, SearchIndexEndpointPage> { private SearchIndexEndpointPage( PageContext context, SearchIndexEndpointResponse response) { super(context, response); } private static SearchIndexEndpointPage createEmptyPage() { return new SearchIndexEndpointPage(null, null); } @Override protected SearchIndexEndpointPage createPage( PageContext context, SearchIndexEndpointResponse response) { return new SearchIndexEndpointPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class SearchIndexEndpointFixedSizeCollection extends AbstractFixedSizeCollection< SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchResultItem, SearchIndexEndpointPage, SearchIndexEndpointFixedSizeCollection> { private SearchIndexEndpointFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static SearchIndexEndpointFixedSizeCollection createEmptyCollection() { return new SearchIndexEndpointFixedSizeCollection(null, 0); } @Override protected SearchIndexEndpointFixedSizeCollection createCollection( List pages, int collectionSize) { return new SearchIndexEndpointFixedSizeCollection(pages, collectionSize); } } public static class ListIndexEndpointsPagedResponse extends AbstractPagedListResponse< ListIndexEndpointsRequest, ListIndexEndpointsResponse, IndexEndpoint, ListIndexEndpointsPage, ListIndexEndpointsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListIndexEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListIndexEndpointsPagedResponse(input), MoreExecutors.directExecutor()); } private ListIndexEndpointsPagedResponse(ListIndexEndpointsPage page) { super(page, ListIndexEndpointsFixedSizeCollection.createEmptyCollection()); } } public static class ListIndexEndpointsPage extends AbstractPage< ListIndexEndpointsRequest, ListIndexEndpointsResponse, IndexEndpoint, ListIndexEndpointsPage> { private ListIndexEndpointsPage( PageContext context, ListIndexEndpointsResponse response) { super(context, response); } private static ListIndexEndpointsPage createEmptyPage() { return new ListIndexEndpointsPage(null, null); } @Override protected ListIndexEndpointsPage createPage( PageContext context, ListIndexEndpointsResponse response) { return new ListIndexEndpointsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListIndexEndpointsFixedSizeCollection extends AbstractFixedSizeCollection< ListIndexEndpointsRequest, ListIndexEndpointsResponse, IndexEndpoint, ListIndexEndpointsPage, ListIndexEndpointsFixedSizeCollection> { private ListIndexEndpointsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListIndexEndpointsFixedSizeCollection createEmptyCollection() { return new ListIndexEndpointsFixedSizeCollection(null, 0); } @Override protected ListIndexEndpointsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListIndexEndpointsFixedSizeCollection(pages, collectionSize); } } public static class ListCollectionsPagedResponse extends AbstractPagedListResponse< ListCollectionsRequest, ListCollectionsResponse, Collection, ListCollectionsPage, ListCollectionsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListCollectionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListCollectionsPagedResponse(input), MoreExecutors.directExecutor()); } private ListCollectionsPagedResponse(ListCollectionsPage page) { super(page, ListCollectionsFixedSizeCollection.createEmptyCollection()); } } public static class ListCollectionsPage extends AbstractPage< ListCollectionsRequest, ListCollectionsResponse, Collection, ListCollectionsPage> { private ListCollectionsPage( PageContext context, ListCollectionsResponse response) { super(context, response); } private static ListCollectionsPage createEmptyPage() { return new ListCollectionsPage(null, null); } @Override protected ListCollectionsPage createPage( PageContext context, ListCollectionsResponse response) { return new ListCollectionsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListCollectionsFixedSizeCollection extends AbstractFixedSizeCollection< ListCollectionsRequest, ListCollectionsResponse, Collection, ListCollectionsPage, ListCollectionsFixedSizeCollection> { private ListCollectionsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListCollectionsFixedSizeCollection createEmptyCollection() { return new ListCollectionsFixedSizeCollection(null, 0); } @Override protected ListCollectionsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListCollectionsFixedSizeCollection(pages, collectionSize); } } public static class ViewCollectionItemsPagedResponse extends AbstractPagedListResponse< ViewCollectionItemsRequest, ViewCollectionItemsResponse, CollectionItem, ViewCollectionItemsPage, ViewCollectionItemsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ViewCollectionItemsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ViewCollectionItemsPagedResponse(input), MoreExecutors.directExecutor()); } private ViewCollectionItemsPagedResponse(ViewCollectionItemsPage page) { super(page, ViewCollectionItemsFixedSizeCollection.createEmptyCollection()); } } public static class ViewCollectionItemsPage extends AbstractPage< ViewCollectionItemsRequest, ViewCollectionItemsResponse, CollectionItem, ViewCollectionItemsPage> { private ViewCollectionItemsPage( PageContext context, ViewCollectionItemsResponse response) { super(context, response); } private static ViewCollectionItemsPage createEmptyPage() { return new ViewCollectionItemsPage(null, null); } @Override protected ViewCollectionItemsPage createPage( PageContext context, ViewCollectionItemsResponse response) { return new ViewCollectionItemsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ViewCollectionItemsFixedSizeCollection extends AbstractFixedSizeCollection< ViewCollectionItemsRequest, ViewCollectionItemsResponse, CollectionItem, ViewCollectionItemsPage, ViewCollectionItemsFixedSizeCollection> { private ViewCollectionItemsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ViewCollectionItemsFixedSizeCollection createEmptyCollection() { return new ViewCollectionItemsFixedSizeCollection(null, 0); } @Override protected ViewCollectionItemsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ViewCollectionItemsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy