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

com.google.cloud.visionai.v1.stub.HttpJsonWarehouseStub 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.stub;

import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse;
import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.httpjson.ApiMethodDescriptor;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
import com.google.api.gax.httpjson.ProtoMessageResponseParser;
import com.google.api.gax.httpjson.ProtoRestSerializer;
import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
import com.google.api.gax.rpc.BidiStreamingCallable;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.visionai.v1.AddCollectionItemRequest;
import com.google.cloud.visionai.v1.AddCollectionItemResponse;
import com.google.cloud.visionai.v1.AnalyzeAssetMetadata;
import com.google.cloud.visionai.v1.AnalyzeAssetRequest;
import com.google.cloud.visionai.v1.AnalyzeAssetResponse;
import com.google.cloud.visionai.v1.AnalyzeCorpusMetadata;
import com.google.cloud.visionai.v1.AnalyzeCorpusRequest;
import com.google.cloud.visionai.v1.AnalyzeCorpusResponse;
import com.google.cloud.visionai.v1.Annotation;
import com.google.cloud.visionai.v1.Asset;
import com.google.cloud.visionai.v1.ClipAssetRequest;
import com.google.cloud.visionai.v1.ClipAssetResponse;
import com.google.cloud.visionai.v1.Collection;
import com.google.cloud.visionai.v1.Corpus;
import com.google.cloud.visionai.v1.CreateAnnotationRequest;
import com.google.cloud.visionai.v1.CreateAssetRequest;
import com.google.cloud.visionai.v1.CreateCollectionMetadata;
import com.google.cloud.visionai.v1.CreateCollectionRequest;
import com.google.cloud.visionai.v1.CreateCorpusMetadata;
import com.google.cloud.visionai.v1.CreateCorpusRequest;
import com.google.cloud.visionai.v1.CreateDataSchemaRequest;
import com.google.cloud.visionai.v1.CreateIndexEndpointMetadata;
import com.google.cloud.visionai.v1.CreateIndexEndpointRequest;
import com.google.cloud.visionai.v1.CreateIndexMetadata;
import com.google.cloud.visionai.v1.CreateIndexRequest;
import com.google.cloud.visionai.v1.CreateSearchConfigRequest;
import com.google.cloud.visionai.v1.CreateSearchHypernymRequest;
import com.google.cloud.visionai.v1.DataSchema;
import com.google.cloud.visionai.v1.DeleteAnnotationRequest;
import com.google.cloud.visionai.v1.DeleteAssetMetadata;
import com.google.cloud.visionai.v1.DeleteAssetRequest;
import com.google.cloud.visionai.v1.DeleteCollectionMetadata;
import com.google.cloud.visionai.v1.DeleteCollectionRequest;
import com.google.cloud.visionai.v1.DeleteCorpusRequest;
import com.google.cloud.visionai.v1.DeleteDataSchemaRequest;
import com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata;
import com.google.cloud.visionai.v1.DeleteIndexEndpointRequest;
import com.google.cloud.visionai.v1.DeleteIndexMetadata;
import com.google.cloud.visionai.v1.DeleteIndexRequest;
import com.google.cloud.visionai.v1.DeleteSearchConfigRequest;
import com.google.cloud.visionai.v1.DeleteSearchHypernymRequest;
import com.google.cloud.visionai.v1.DeployIndexMetadata;
import com.google.cloud.visionai.v1.DeployIndexRequest;
import com.google.cloud.visionai.v1.DeployIndexResponse;
import com.google.cloud.visionai.v1.GenerateHlsUriRequest;
import com.google.cloud.visionai.v1.GenerateHlsUriResponse;
import com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest;
import com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse;
import com.google.cloud.visionai.v1.GetAnnotationRequest;
import com.google.cloud.visionai.v1.GetAssetRequest;
import com.google.cloud.visionai.v1.GetCollectionRequest;
import com.google.cloud.visionai.v1.GetCorpusRequest;
import com.google.cloud.visionai.v1.GetDataSchemaRequest;
import com.google.cloud.visionai.v1.GetIndexEndpointRequest;
import com.google.cloud.visionai.v1.GetIndexRequest;
import com.google.cloud.visionai.v1.GetSearchConfigRequest;
import com.google.cloud.visionai.v1.GetSearchHypernymRequest;
import com.google.cloud.visionai.v1.ImportAssetsMetadata;
import com.google.cloud.visionai.v1.ImportAssetsRequest;
import com.google.cloud.visionai.v1.ImportAssetsResponse;
import com.google.cloud.visionai.v1.Index;
import com.google.cloud.visionai.v1.IndexAssetMetadata;
import com.google.cloud.visionai.v1.IndexAssetRequest;
import com.google.cloud.visionai.v1.IndexAssetResponse;
import com.google.cloud.visionai.v1.IndexEndpoint;
import com.google.cloud.visionai.v1.IngestAssetRequest;
import com.google.cloud.visionai.v1.IngestAssetResponse;
import com.google.cloud.visionai.v1.ListAnnotationsRequest;
import com.google.cloud.visionai.v1.ListAnnotationsResponse;
import com.google.cloud.visionai.v1.ListAssetsRequest;
import com.google.cloud.visionai.v1.ListAssetsResponse;
import com.google.cloud.visionai.v1.ListCollectionsRequest;
import com.google.cloud.visionai.v1.ListCollectionsResponse;
import com.google.cloud.visionai.v1.ListCorporaRequest;
import com.google.cloud.visionai.v1.ListCorporaResponse;
import com.google.cloud.visionai.v1.ListDataSchemasRequest;
import com.google.cloud.visionai.v1.ListDataSchemasResponse;
import com.google.cloud.visionai.v1.ListIndexEndpointsRequest;
import com.google.cloud.visionai.v1.ListIndexEndpointsResponse;
import com.google.cloud.visionai.v1.ListIndexesRequest;
import com.google.cloud.visionai.v1.ListIndexesResponse;
import com.google.cloud.visionai.v1.ListSearchConfigsRequest;
import com.google.cloud.visionai.v1.ListSearchConfigsResponse;
import com.google.cloud.visionai.v1.ListSearchHypernymsRequest;
import com.google.cloud.visionai.v1.ListSearchHypernymsResponse;
import com.google.cloud.visionai.v1.RemoveCollectionItemRequest;
import com.google.cloud.visionai.v1.RemoveCollectionItemResponse;
import com.google.cloud.visionai.v1.RemoveIndexAssetMetadata;
import com.google.cloud.visionai.v1.RemoveIndexAssetRequest;
import com.google.cloud.visionai.v1.RemoveIndexAssetResponse;
import com.google.cloud.visionai.v1.SearchAssetsRequest;
import com.google.cloud.visionai.v1.SearchAssetsResponse;
import com.google.cloud.visionai.v1.SearchConfig;
import com.google.cloud.visionai.v1.SearchHypernym;
import com.google.cloud.visionai.v1.SearchIndexEndpointRequest;
import com.google.cloud.visionai.v1.SearchIndexEndpointResponse;
import com.google.cloud.visionai.v1.UndeployIndexMetadata;
import com.google.cloud.visionai.v1.UndeployIndexRequest;
import com.google.cloud.visionai.v1.UndeployIndexResponse;
import com.google.cloud.visionai.v1.UpdateAnnotationRequest;
import com.google.cloud.visionai.v1.UpdateAssetRequest;
import com.google.cloud.visionai.v1.UpdateCollectionRequest;
import com.google.cloud.visionai.v1.UpdateCorpusRequest;
import com.google.cloud.visionai.v1.UpdateDataSchemaRequest;
import com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata;
import com.google.cloud.visionai.v1.UpdateIndexEndpointRequest;
import com.google.cloud.visionai.v1.UpdateIndexMetadata;
import com.google.cloud.visionai.v1.UpdateIndexRequest;
import com.google.cloud.visionai.v1.UpdateSearchConfigRequest;
import com.google.cloud.visionai.v1.UpdateSearchHypernymRequest;
import com.google.cloud.visionai.v1.UploadAssetMetadata;
import com.google.cloud.visionai.v1.UploadAssetRequest;
import com.google.cloud.visionai.v1.UploadAssetResponse;
import com.google.cloud.visionai.v1.ViewCollectionItemsRequest;
import com.google.cloud.visionai.v1.ViewCollectionItemsResponse;
import com.google.cloud.visionai.v1.ViewIndexedAssetsRequest;
import com.google.cloud.visionai.v1.ViewIndexedAssetsResponse;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * REST stub implementation for the Warehouse service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonWarehouseStub extends WarehouseStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(DeployIndexResponse.getDescriptor()) .add(IndexEndpoint.getDescriptor()) .add(CreateCollectionMetadata.getDescriptor()) .add(UpdateIndexEndpointMetadata.getDescriptor()) .add(DeployIndexMetadata.getDescriptor()) .add(CreateIndexEndpointMetadata.getDescriptor()) .add(DeleteAssetMetadata.getDescriptor()) .add(UndeployIndexMetadata.getDescriptor()) .add(UndeployIndexResponse.getDescriptor()) .add(Empty.getDescriptor()) .add(ImportAssetsMetadata.getDescriptor()) .add(Index.getDescriptor()) .add(CreateCorpusMetadata.getDescriptor()) .add(AnalyzeCorpusMetadata.getDescriptor()) .add(DeleteIndexEndpointMetadata.getDescriptor()) .add(RemoveIndexAssetResponse.getDescriptor()) .add(DeleteIndexMetadata.getDescriptor()) .add(CreateIndexMetadata.getDescriptor()) .add(Collection.getDescriptor()) .add(UploadAssetResponse.getDescriptor()) .add(IndexAssetMetadata.getDescriptor()) .add(DeleteCollectionMetadata.getDescriptor()) .add(AnalyzeAssetMetadata.getDescriptor()) .add(AnalyzeAssetResponse.getDescriptor()) .add(ImportAssetsResponse.getDescriptor()) .add(UploadAssetMetadata.getDescriptor()) .add(IndexAssetResponse.getDescriptor()) .add(RemoveIndexAssetMetadata.getDescriptor()) .add(Corpus.getDescriptor()) .add(AnalyzeCorpusResponse.getDescriptor()) .add(UpdateIndexMetadata.getDescriptor()) .build(); private static final ApiMethodDescriptor createAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/assets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); if (request.hasAssetId()) { serializer.putQueryParam(fields, "assetId", request.getAssetId()); } serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Asset.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAsset") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "asset.name", request.getAsset().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Asset.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAsset") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Asset.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAssets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/assets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAsset") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor uploadAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UploadAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UploadAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< GenerateRetrievalUrlRequest, GenerateRetrievalUrlResponse> generateRetrievalUrlMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateRetrievalUrl") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(GenerateRetrievalUrlResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor analyzeAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:analyze", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (AnalyzeAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor indexAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/IndexAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:index", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (IndexAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor removeIndexAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveIndexAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:removeIndex", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (RemoveIndexAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor viewIndexedAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewIndexedAssets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{index=projects/*/locations/*/corpora/*/indexes/*}:viewAssets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "index", request.getIndex()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ViewIndexedAssetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndex") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/indexes", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "indexId", request.getIndexId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("index", request.getIndex(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateIndexRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndex") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "index.name", request.getIndex().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("index", request.getIndex(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateIndexRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndex") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/indexes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Index.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listIndexesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexes") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/indexes", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListIndexesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndex") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/indexes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteIndexRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createCorpusMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCorpus") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/corpora", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("corpus", request.getCorpus(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCorpusRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getCorpusMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCorpus") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Corpus.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateCorpusMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCorpus") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{corpus.name=projects/*/locations/*/corpora/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "corpus.name", request.getCorpus().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("corpus", request.getCorpus(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Corpus.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listCorporaMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCorpora") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/corpora", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListCorporaResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteCorpusMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCorpus") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor analyzeCorpusMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeCorpus") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*}:analyze", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (AnalyzeCorpusRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createDataSchemaMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateDataSchema") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("dataSchema", request.getDataSchema(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(DataSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateDataSchemaMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateDataSchema") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{dataSchema.name=projects/*/locations/*/corpora/*/dataSchemas/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "dataSchema.name", request.getDataSchema().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("dataSchema", request.getDataSchema(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(DataSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getDataSchemaMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetDataSchema") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(DataSchema.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteDataSchemaMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteDataSchema") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listDataSchemasMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListDataSchemas") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListDataSchemasResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createAnnotationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAnnotation") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); if (request.hasAnnotationId()) { serializer.putQueryParam( fields, "annotationId", request.getAnnotationId()); } serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("annotation", request.getAnnotation(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Annotation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getAnnotationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAnnotation") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Annotation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listAnnotationsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAnnotations") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListAnnotationsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateAnnotationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAnnotation") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "annotation.name", request.getAnnotation().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("annotation", request.getAnnotation(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Annotation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteAnnotationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAnnotation") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor clipAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ClipAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ClipAssetResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor generateHlsUriMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateHlsUri") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(GenerateHlsUriResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor importAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ImportAssets") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/assets:import", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (ImportAssetsRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createSearchConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam( fields, "searchConfigId", request.getSearchConfigId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("searchConfig", request.getSearchConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateSearchConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchConfig") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{searchConfig.name=projects/*/locations/*/corpora/*/searchConfigs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "searchConfig.name", request.getSearchConfig().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("searchConfig", request.getSearchConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getSearchConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchConfig") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteSearchConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchConfig") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listSearchConfigsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchConfigs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListSearchConfigsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createSearchHypernymMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchHypernym") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); if (request.hasSearchHypernymId()) { serializer.putQueryParam( fields, "searchHypernymId", request.getSearchHypernymId()); } serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("searchHypernym", request.getSearchHypernym(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchHypernym.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateSearchHypernymMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchHypernym") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{searchHypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "searchHypernym.name", request.getSearchHypernym().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("searchHypernym", request.getSearchHypernym(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchHypernym.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getSearchHypernymMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchHypernym") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchHypernym.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteSearchHypernymMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchHypernym") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listSearchHypernymsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchHypernyms") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListSearchHypernymsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor searchAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchAssets") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "corpus", request.getCorpus()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearCorpus().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchAssetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor searchIndexEndpointMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchIndexEndpoint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "indexEndpoint", request.getIndexEndpoint()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "*", request.toBuilder().clearIndexEndpoint().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchIndexEndpointResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createIndexEndpointMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndexEndpoint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/indexEndpoints", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam( fields, "indexEndpointId", request.getIndexEndpointId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("indexEndpoint", request.getIndexEndpoint(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateIndexEndpointRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getIndexEndpointMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndexEndpoint") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/indexEndpoints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(IndexEndpoint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listIndexEndpointsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexEndpoints") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/indexEndpoints", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListIndexEndpointsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateIndexEndpointMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndexEndpoint") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{indexEndpoint.name=projects/*/locations/*/indexEndpoints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "indexEndpoint.name", request.getIndexEndpoint().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("indexEndpoint", request.getIndexEndpoint(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateIndexEndpointRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteIndexEndpointMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndexEndpoint") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/indexEndpoints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteIndexEndpointRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deployIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeployIndex") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "indexEndpoint", request.getIndexEndpoint()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "*", request.toBuilder().clearIndexEndpoint().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeployIndexRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor undeployIndexMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UndeployIndex") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "indexEndpoint", request.getIndexEndpoint()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "*", request.toBuilder().clearIndexEndpoint().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UndeployIndexRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createCollectionMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCollection") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/collections", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); if (request.hasCollectionId()) { serializer.putQueryParam( fields, "collectionId", request.getCollectionId()); } serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("collection", request.getCollection(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCollectionRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCollectionMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCollection") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/collections/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteCollectionRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getCollectionMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCollection") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/corpora/*/collections/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Collection.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateCollectionMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCollection") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "collection.name", request.getCollection().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("collection", request.getCollection(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Collection.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listCollectionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCollections") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/corpora/*}/collections", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListCollectionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor addCollectionItemMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/AddCollectionItem") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "item.collection", request.getItem().getCollection()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(AddCollectionItemResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< RemoveCollectionItemRequest, RemoveCollectionItemResponse> removeCollectionItemMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveCollectionItem") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "item.collection", request.getItem().getCollection()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(RemoveCollectionItemResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor viewCollectionItemsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewCollectionItems") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "collection", request.getCollection()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ViewCollectionItemsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private final UnaryCallable createAssetCallable; private final UnaryCallable updateAssetCallable; private final UnaryCallable getAssetCallable; private final UnaryCallable listAssetsCallable; private final UnaryCallable listAssetsPagedCallable; private final UnaryCallable deleteAssetCallable; private final OperationCallable deleteAssetOperationCallable; private final UnaryCallable uploadAssetCallable; private final OperationCallable uploadAssetOperationCallable; private final UnaryCallable generateRetrievalUrlCallable; private final UnaryCallable analyzeAssetCallable; private final OperationCallable analyzeAssetOperationCallable; private final UnaryCallable indexAssetCallable; private final OperationCallable indexAssetOperationCallable; private final UnaryCallable removeIndexAssetCallable; private final OperationCallable< RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> removeIndexAssetOperationCallable; private final UnaryCallable viewIndexedAssetsCallable; private final UnaryCallable viewIndexedAssetsPagedCallable; private final UnaryCallable createIndexCallable; private final OperationCallable createIndexOperationCallable; private final UnaryCallable updateIndexCallable; private final OperationCallable updateIndexOperationCallable; private final UnaryCallable getIndexCallable; private final UnaryCallable listIndexesCallable; private final UnaryCallable listIndexesPagedCallable; private final UnaryCallable deleteIndexCallable; private final OperationCallable deleteIndexOperationCallable; private final UnaryCallable createCorpusCallable; private final OperationCallable createCorpusOperationCallable; private final UnaryCallable getCorpusCallable; private final UnaryCallable updateCorpusCallable; private final UnaryCallable listCorporaCallable; private final UnaryCallable listCorporaPagedCallable; private final UnaryCallable deleteCorpusCallable; private final UnaryCallable analyzeCorpusCallable; private final OperationCallable< AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> analyzeCorpusOperationCallable; private final UnaryCallable createDataSchemaCallable; private final UnaryCallable updateDataSchemaCallable; private final UnaryCallable getDataSchemaCallable; private final UnaryCallable deleteDataSchemaCallable; private final UnaryCallable listDataSchemasCallable; private final UnaryCallable listDataSchemasPagedCallable; private final UnaryCallable createAnnotationCallable; private final UnaryCallable getAnnotationCallable; private final UnaryCallable listAnnotationsCallable; private final UnaryCallable listAnnotationsPagedCallable; private final UnaryCallable updateAnnotationCallable; private final UnaryCallable deleteAnnotationCallable; private final UnaryCallable clipAssetCallable; private final UnaryCallable generateHlsUriCallable; private final UnaryCallable importAssetsCallable; private final OperationCallable importAssetsOperationCallable; private final UnaryCallable createSearchConfigCallable; private final UnaryCallable updateSearchConfigCallable; private final UnaryCallable getSearchConfigCallable; private final UnaryCallable deleteSearchConfigCallable; private final UnaryCallable listSearchConfigsCallable; private final UnaryCallable listSearchConfigsPagedCallable; private final UnaryCallable createSearchHypernymCallable; private final UnaryCallable updateSearchHypernymCallable; private final UnaryCallable getSearchHypernymCallable; private final UnaryCallable deleteSearchHypernymCallable; private final UnaryCallable listSearchHypernymsCallable; private final UnaryCallable listSearchHypernymsPagedCallable; private final UnaryCallable searchAssetsCallable; private final UnaryCallable searchAssetsPagedCallable; private final UnaryCallable searchIndexEndpointCallable; private final UnaryCallable searchIndexEndpointPagedCallable; private final UnaryCallable createIndexEndpointCallable; private final OperationCallable< CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> createIndexEndpointOperationCallable; private final UnaryCallable getIndexEndpointCallable; private final UnaryCallable listIndexEndpointsCallable; private final UnaryCallable listIndexEndpointsPagedCallable; private final UnaryCallable updateIndexEndpointCallable; private final OperationCallable< UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> updateIndexEndpointOperationCallable; private final UnaryCallable deleteIndexEndpointCallable; private final OperationCallable deleteIndexEndpointOperationCallable; private final UnaryCallable deployIndexCallable; private final OperationCallable deployIndexOperationCallable; private final UnaryCallable undeployIndexCallable; private final OperationCallable< UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> undeployIndexOperationCallable; private final UnaryCallable createCollectionCallable; private final OperationCallable createCollectionOperationCallable; private final UnaryCallable deleteCollectionCallable; private final OperationCallable deleteCollectionOperationCallable; private final UnaryCallable getCollectionCallable; private final UnaryCallable updateCollectionCallable; private final UnaryCallable listCollectionsCallable; private final UnaryCallable listCollectionsPagedCallable; private final UnaryCallable addCollectionItemCallable; private final UnaryCallable removeCollectionItemCallable; private final UnaryCallable viewCollectionItemsCallable; private final UnaryCallable viewCollectionItemsPagedCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonWarehouseStub create(WarehouseStubSettings settings) throws IOException { return new HttpJsonWarehouseStub(settings, ClientContext.create(settings)); } public static final HttpJsonWarehouseStub create(ClientContext clientContext) throws IOException { return new HttpJsonWarehouseStub( WarehouseStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonWarehouseStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonWarehouseStub( WarehouseStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonWarehouseStub, 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 HttpJsonWarehouseStub(WarehouseStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonWarehouseCallableFactory()); } /** * Constructs an instance of HttpJsonWarehouseStub, 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 HttpJsonWarehouseStub( WarehouseStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.httpJsonOperationsStub = HttpJsonOperationsStub.create( clientContext, callableFactory, typeRegistry, ImmutableMap.builder() .put( "google.longrunning.Operations.CancelOperation", HttpRule.newBuilder() .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") .build()) .put( "google.longrunning.Operations.DeleteOperation", HttpRule.newBuilder() .setDelete("/v1/{name=projects/*/locations/*/operations/*}") .build()) .put( "google.longrunning.Operations.GetOperation", HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/operations/*}") .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/warehouseOperations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( "/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( "/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( "/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( "/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/corpora/*/operations/*}") .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") .build()) .build()) .put( "google.longrunning.Operations.ListOperations", HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*}/operations") .build()) .build()); HttpJsonCallSettings createAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("asset.name", String.valueOf(request.getAsset().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings uploadAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(uploadAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings generateRetrievalUrlTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(generateRetrievalUrlMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings analyzeAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(analyzeAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings indexAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(indexAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings removeIndexAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(removeIndexAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings viewIndexedAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(viewIndexedAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("index", String.valueOf(request.getIndex())); return builder.build(); }) .build(); HttpJsonCallSettings createIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("index.name", String.valueOf(request.getIndex().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listIndexesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listIndexesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCorpusTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCorpusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCorpusTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCorpusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateCorpusTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateCorpusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("corpus.name", String.valueOf(request.getCorpus().getName())); return builder.build(); }) .build(); HttpJsonCallSettings listCorporaTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listCorporaMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCorpusTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCorpusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings analyzeCorpusTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(analyzeCorpusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createDataSchemaTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createDataSchemaMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateDataSchemaTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateDataSchemaMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "data_schema.name", String.valueOf(request.getDataSchema().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getDataSchemaTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getDataSchemaMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteDataSchemaTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteDataSchemaMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listDataSchemasTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listDataSchemasMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createAnnotationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createAnnotationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getAnnotationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getAnnotationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listAnnotationsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listAnnotationsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateAnnotationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateAnnotationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("annotation.name", String.valueOf(request.getAnnotation().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteAnnotationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteAnnotationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings clipAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(clipAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings generateHlsUriTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(generateHlsUriMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings importAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(importAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createSearchConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createSearchConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateSearchConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateSearchConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "search_config.name", String.valueOf(request.getSearchConfig().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getSearchConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSearchConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteSearchConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteSearchConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listSearchConfigsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listSearchConfigsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createSearchHypernymTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createSearchHypernymMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateSearchHypernymTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateSearchHypernymMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "search_hypernym.name", String.valueOf(request.getSearchHypernym().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getSearchHypernymTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSearchHypernymMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteSearchHypernymTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteSearchHypernymMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listSearchHypernymsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listSearchHypernymsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings searchAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(searchAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("corpus", String.valueOf(request.getCorpus())); return builder.build(); }) .build(); HttpJsonCallSettings searchIndexEndpointTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(searchIndexEndpointMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); return builder.build(); }) .build(); HttpJsonCallSettings createIndexEndpointTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createIndexEndpointMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getIndexEndpointTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getIndexEndpointMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listIndexEndpointsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listIndexEndpointsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateIndexEndpointTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateIndexEndpointMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "index_endpoint.name", String.valueOf(request.getIndexEndpoint().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteIndexEndpointTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteIndexEndpointMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deployIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deployIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); return builder.build(); }) .build(); HttpJsonCallSettings undeployIndexTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(undeployIndexMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); return builder.build(); }) .build(); HttpJsonCallSettings createCollectionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCollectionMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCollectionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCollectionMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getCollectionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCollectionMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateCollectionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateCollectionMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("collection.name", String.valueOf(request.getCollection().getName())); return builder.build(); }) .build(); HttpJsonCallSettings listCollectionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listCollectionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings addCollectionItemTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(addCollectionItemMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "item.collection", String.valueOf(request.getItem().getCollection())); return builder.build(); }) .build(); HttpJsonCallSettings removeCollectionItemTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(removeCollectionItemMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "item.collection", String.valueOf(request.getItem().getCollection())); return builder.build(); }) .build(); HttpJsonCallSettings viewCollectionItemsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(viewCollectionItemsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("collection", String.valueOf(request.getCollection())); return builder.build(); }) .build(); this.createAssetCallable = callableFactory.createUnaryCallable( createAssetTransportSettings, settings.createAssetSettings(), clientContext); this.updateAssetCallable = callableFactory.createUnaryCallable( updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); this.getAssetCallable = callableFactory.createUnaryCallable( getAssetTransportSettings, settings.getAssetSettings(), clientContext); this.listAssetsCallable = callableFactory.createUnaryCallable( listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); this.listAssetsPagedCallable = callableFactory.createPagedCallable( listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); this.deleteAssetCallable = callableFactory.createUnaryCallable( deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); this.deleteAssetOperationCallable = callableFactory.createOperationCallable( deleteAssetTransportSettings, settings.deleteAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.uploadAssetCallable = callableFactory.createUnaryCallable( uploadAssetTransportSettings, settings.uploadAssetSettings(), clientContext); this.uploadAssetOperationCallable = callableFactory.createOperationCallable( uploadAssetTransportSettings, settings.uploadAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.generateRetrievalUrlCallable = callableFactory.createUnaryCallable( generateRetrievalUrlTransportSettings, settings.generateRetrievalUrlSettings(), clientContext); this.analyzeAssetCallable = callableFactory.createUnaryCallable( analyzeAssetTransportSettings, settings.analyzeAssetSettings(), clientContext); this.analyzeAssetOperationCallable = callableFactory.createOperationCallable( analyzeAssetTransportSettings, settings.analyzeAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.indexAssetCallable = callableFactory.createUnaryCallable( indexAssetTransportSettings, settings.indexAssetSettings(), clientContext); this.indexAssetOperationCallable = callableFactory.createOperationCallable( indexAssetTransportSettings, settings.indexAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.removeIndexAssetCallable = callableFactory.createUnaryCallable( removeIndexAssetTransportSettings, settings.removeIndexAssetSettings(), clientContext); this.removeIndexAssetOperationCallable = callableFactory.createOperationCallable( removeIndexAssetTransportSettings, settings.removeIndexAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.viewIndexedAssetsCallable = callableFactory.createUnaryCallable( viewIndexedAssetsTransportSettings, settings.viewIndexedAssetsSettings(), clientContext); this.viewIndexedAssetsPagedCallable = callableFactory.createPagedCallable( viewIndexedAssetsTransportSettings, settings.viewIndexedAssetsSettings(), clientContext); this.createIndexCallable = callableFactory.createUnaryCallable( createIndexTransportSettings, settings.createIndexSettings(), clientContext); this.createIndexOperationCallable = callableFactory.createOperationCallable( createIndexTransportSettings, settings.createIndexOperationSettings(), clientContext, httpJsonOperationsStub); this.updateIndexCallable = callableFactory.createUnaryCallable( updateIndexTransportSettings, settings.updateIndexSettings(), clientContext); this.updateIndexOperationCallable = callableFactory.createOperationCallable( updateIndexTransportSettings, settings.updateIndexOperationSettings(), clientContext, httpJsonOperationsStub); this.getIndexCallable = callableFactory.createUnaryCallable( getIndexTransportSettings, settings.getIndexSettings(), clientContext); this.listIndexesCallable = callableFactory.createUnaryCallable( listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); this.listIndexesPagedCallable = callableFactory.createPagedCallable( listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); this.deleteIndexCallable = callableFactory.createUnaryCallable( deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext); this.deleteIndexOperationCallable = callableFactory.createOperationCallable( deleteIndexTransportSettings, settings.deleteIndexOperationSettings(), clientContext, httpJsonOperationsStub); this.createCorpusCallable = callableFactory.createUnaryCallable( createCorpusTransportSettings, settings.createCorpusSettings(), clientContext); this.createCorpusOperationCallable = callableFactory.createOperationCallable( createCorpusTransportSettings, settings.createCorpusOperationSettings(), clientContext, httpJsonOperationsStub); this.getCorpusCallable = callableFactory.createUnaryCallable( getCorpusTransportSettings, settings.getCorpusSettings(), clientContext); this.updateCorpusCallable = callableFactory.createUnaryCallable( updateCorpusTransportSettings, settings.updateCorpusSettings(), clientContext); this.listCorporaCallable = callableFactory.createUnaryCallable( listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); this.listCorporaPagedCallable = callableFactory.createPagedCallable( listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); this.deleteCorpusCallable = callableFactory.createUnaryCallable( deleteCorpusTransportSettings, settings.deleteCorpusSettings(), clientContext); this.analyzeCorpusCallable = callableFactory.createUnaryCallable( analyzeCorpusTransportSettings, settings.analyzeCorpusSettings(), clientContext); this.analyzeCorpusOperationCallable = callableFactory.createOperationCallable( analyzeCorpusTransportSettings, settings.analyzeCorpusOperationSettings(), clientContext, httpJsonOperationsStub); this.createDataSchemaCallable = callableFactory.createUnaryCallable( createDataSchemaTransportSettings, settings.createDataSchemaSettings(), clientContext); this.updateDataSchemaCallable = callableFactory.createUnaryCallable( updateDataSchemaTransportSettings, settings.updateDataSchemaSettings(), clientContext); this.getDataSchemaCallable = callableFactory.createUnaryCallable( getDataSchemaTransportSettings, settings.getDataSchemaSettings(), clientContext); this.deleteDataSchemaCallable = callableFactory.createUnaryCallable( deleteDataSchemaTransportSettings, settings.deleteDataSchemaSettings(), clientContext); this.listDataSchemasCallable = callableFactory.createUnaryCallable( listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); this.listDataSchemasPagedCallable = callableFactory.createPagedCallable( listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); this.createAnnotationCallable = callableFactory.createUnaryCallable( createAnnotationTransportSettings, settings.createAnnotationSettings(), clientContext); this.getAnnotationCallable = callableFactory.createUnaryCallable( getAnnotationTransportSettings, settings.getAnnotationSettings(), clientContext); this.listAnnotationsCallable = callableFactory.createUnaryCallable( listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); this.listAnnotationsPagedCallable = callableFactory.createPagedCallable( listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); this.updateAnnotationCallable = callableFactory.createUnaryCallable( updateAnnotationTransportSettings, settings.updateAnnotationSettings(), clientContext); this.deleteAnnotationCallable = callableFactory.createUnaryCallable( deleteAnnotationTransportSettings, settings.deleteAnnotationSettings(), clientContext); this.clipAssetCallable = callableFactory.createUnaryCallable( clipAssetTransportSettings, settings.clipAssetSettings(), clientContext); this.generateHlsUriCallable = callableFactory.createUnaryCallable( generateHlsUriTransportSettings, settings.generateHlsUriSettings(), clientContext); this.importAssetsCallable = callableFactory.createUnaryCallable( importAssetsTransportSettings, settings.importAssetsSettings(), clientContext); this.importAssetsOperationCallable = callableFactory.createOperationCallable( importAssetsTransportSettings, settings.importAssetsOperationSettings(), clientContext, httpJsonOperationsStub); this.createSearchConfigCallable = callableFactory.createUnaryCallable( createSearchConfigTransportSettings, settings.createSearchConfigSettings(), clientContext); this.updateSearchConfigCallable = callableFactory.createUnaryCallable( updateSearchConfigTransportSettings, settings.updateSearchConfigSettings(), clientContext); this.getSearchConfigCallable = callableFactory.createUnaryCallable( getSearchConfigTransportSettings, settings.getSearchConfigSettings(), clientContext); this.deleteSearchConfigCallable = callableFactory.createUnaryCallable( deleteSearchConfigTransportSettings, settings.deleteSearchConfigSettings(), clientContext); this.listSearchConfigsCallable = callableFactory.createUnaryCallable( listSearchConfigsTransportSettings, settings.listSearchConfigsSettings(), clientContext); this.listSearchConfigsPagedCallable = callableFactory.createPagedCallable( listSearchConfigsTransportSettings, settings.listSearchConfigsSettings(), clientContext); this.createSearchHypernymCallable = callableFactory.createUnaryCallable( createSearchHypernymTransportSettings, settings.createSearchHypernymSettings(), clientContext); this.updateSearchHypernymCallable = callableFactory.createUnaryCallable( updateSearchHypernymTransportSettings, settings.updateSearchHypernymSettings(), clientContext); this.getSearchHypernymCallable = callableFactory.createUnaryCallable( getSearchHypernymTransportSettings, settings.getSearchHypernymSettings(), clientContext); this.deleteSearchHypernymCallable = callableFactory.createUnaryCallable( deleteSearchHypernymTransportSettings, settings.deleteSearchHypernymSettings(), clientContext); this.listSearchHypernymsCallable = callableFactory.createUnaryCallable( listSearchHypernymsTransportSettings, settings.listSearchHypernymsSettings(), clientContext); this.listSearchHypernymsPagedCallable = callableFactory.createPagedCallable( listSearchHypernymsTransportSettings, settings.listSearchHypernymsSettings(), clientContext); this.searchAssetsCallable = callableFactory.createUnaryCallable( searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); this.searchAssetsPagedCallable = callableFactory.createPagedCallable( searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); this.searchIndexEndpointCallable = callableFactory.createUnaryCallable( searchIndexEndpointTransportSettings, settings.searchIndexEndpointSettings(), clientContext); this.searchIndexEndpointPagedCallable = callableFactory.createPagedCallable( searchIndexEndpointTransportSettings, settings.searchIndexEndpointSettings(), clientContext); this.createIndexEndpointCallable = callableFactory.createUnaryCallable( createIndexEndpointTransportSettings, settings.createIndexEndpointSettings(), clientContext); this.createIndexEndpointOperationCallable = callableFactory.createOperationCallable( createIndexEndpointTransportSettings, settings.createIndexEndpointOperationSettings(), clientContext, httpJsonOperationsStub); this.getIndexEndpointCallable = callableFactory.createUnaryCallable( getIndexEndpointTransportSettings, settings.getIndexEndpointSettings(), clientContext); this.listIndexEndpointsCallable = callableFactory.createUnaryCallable( listIndexEndpointsTransportSettings, settings.listIndexEndpointsSettings(), clientContext); this.listIndexEndpointsPagedCallable = callableFactory.createPagedCallable( listIndexEndpointsTransportSettings, settings.listIndexEndpointsSettings(), clientContext); this.updateIndexEndpointCallable = callableFactory.createUnaryCallable( updateIndexEndpointTransportSettings, settings.updateIndexEndpointSettings(), clientContext); this.updateIndexEndpointOperationCallable = callableFactory.createOperationCallable( updateIndexEndpointTransportSettings, settings.updateIndexEndpointOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteIndexEndpointCallable = callableFactory.createUnaryCallable( deleteIndexEndpointTransportSettings, settings.deleteIndexEndpointSettings(), clientContext); this.deleteIndexEndpointOperationCallable = callableFactory.createOperationCallable( deleteIndexEndpointTransportSettings, settings.deleteIndexEndpointOperationSettings(), clientContext, httpJsonOperationsStub); this.deployIndexCallable = callableFactory.createUnaryCallable( deployIndexTransportSettings, settings.deployIndexSettings(), clientContext); this.deployIndexOperationCallable = callableFactory.createOperationCallable( deployIndexTransportSettings, settings.deployIndexOperationSettings(), clientContext, httpJsonOperationsStub); this.undeployIndexCallable = callableFactory.createUnaryCallable( undeployIndexTransportSettings, settings.undeployIndexSettings(), clientContext); this.undeployIndexOperationCallable = callableFactory.createOperationCallable( undeployIndexTransportSettings, settings.undeployIndexOperationSettings(), clientContext, httpJsonOperationsStub); this.createCollectionCallable = callableFactory.createUnaryCallable( createCollectionTransportSettings, settings.createCollectionSettings(), clientContext); this.createCollectionOperationCallable = callableFactory.createOperationCallable( createCollectionTransportSettings, settings.createCollectionOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCollectionCallable = callableFactory.createUnaryCallable( deleteCollectionTransportSettings, settings.deleteCollectionSettings(), clientContext); this.deleteCollectionOperationCallable = callableFactory.createOperationCallable( deleteCollectionTransportSettings, settings.deleteCollectionOperationSettings(), clientContext, httpJsonOperationsStub); this.getCollectionCallable = callableFactory.createUnaryCallable( getCollectionTransportSettings, settings.getCollectionSettings(), clientContext); this.updateCollectionCallable = callableFactory.createUnaryCallable( updateCollectionTransportSettings, settings.updateCollectionSettings(), clientContext); this.listCollectionsCallable = callableFactory.createUnaryCallable( listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); this.listCollectionsPagedCallable = callableFactory.createPagedCallable( listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); this.addCollectionItemCallable = callableFactory.createUnaryCallable( addCollectionItemTransportSettings, settings.addCollectionItemSettings(), clientContext); this.removeCollectionItemCallable = callableFactory.createUnaryCallable( removeCollectionItemTransportSettings, settings.removeCollectionItemSettings(), clientContext); this.viewCollectionItemsCallable = callableFactory.createUnaryCallable( viewCollectionItemsTransportSettings, settings.viewCollectionItemsSettings(), clientContext); this.viewCollectionItemsPagedCallable = callableFactory.createPagedCallable( viewCollectionItemsTransportSettings, settings.viewCollectionItemsSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(createAssetMethodDescriptor); methodDescriptors.add(updateAssetMethodDescriptor); methodDescriptors.add(getAssetMethodDescriptor); methodDescriptors.add(listAssetsMethodDescriptor); methodDescriptors.add(deleteAssetMethodDescriptor); methodDescriptors.add(uploadAssetMethodDescriptor); methodDescriptors.add(generateRetrievalUrlMethodDescriptor); methodDescriptors.add(analyzeAssetMethodDescriptor); methodDescriptors.add(indexAssetMethodDescriptor); methodDescriptors.add(removeIndexAssetMethodDescriptor); methodDescriptors.add(viewIndexedAssetsMethodDescriptor); methodDescriptors.add(createIndexMethodDescriptor); methodDescriptors.add(updateIndexMethodDescriptor); methodDescriptors.add(getIndexMethodDescriptor); methodDescriptors.add(listIndexesMethodDescriptor); methodDescriptors.add(deleteIndexMethodDescriptor); methodDescriptors.add(createCorpusMethodDescriptor); methodDescriptors.add(getCorpusMethodDescriptor); methodDescriptors.add(updateCorpusMethodDescriptor); methodDescriptors.add(listCorporaMethodDescriptor); methodDescriptors.add(deleteCorpusMethodDescriptor); methodDescriptors.add(analyzeCorpusMethodDescriptor); methodDescriptors.add(createDataSchemaMethodDescriptor); methodDescriptors.add(updateDataSchemaMethodDescriptor); methodDescriptors.add(getDataSchemaMethodDescriptor); methodDescriptors.add(deleteDataSchemaMethodDescriptor); methodDescriptors.add(listDataSchemasMethodDescriptor); methodDescriptors.add(createAnnotationMethodDescriptor); methodDescriptors.add(getAnnotationMethodDescriptor); methodDescriptors.add(listAnnotationsMethodDescriptor); methodDescriptors.add(updateAnnotationMethodDescriptor); methodDescriptors.add(deleteAnnotationMethodDescriptor); methodDescriptors.add(clipAssetMethodDescriptor); methodDescriptors.add(generateHlsUriMethodDescriptor); methodDescriptors.add(importAssetsMethodDescriptor); methodDescriptors.add(createSearchConfigMethodDescriptor); methodDescriptors.add(updateSearchConfigMethodDescriptor); methodDescriptors.add(getSearchConfigMethodDescriptor); methodDescriptors.add(deleteSearchConfigMethodDescriptor); methodDescriptors.add(listSearchConfigsMethodDescriptor); methodDescriptors.add(createSearchHypernymMethodDescriptor); methodDescriptors.add(updateSearchHypernymMethodDescriptor); methodDescriptors.add(getSearchHypernymMethodDescriptor); methodDescriptors.add(deleteSearchHypernymMethodDescriptor); methodDescriptors.add(listSearchHypernymsMethodDescriptor); methodDescriptors.add(searchAssetsMethodDescriptor); methodDescriptors.add(searchIndexEndpointMethodDescriptor); methodDescriptors.add(createIndexEndpointMethodDescriptor); methodDescriptors.add(getIndexEndpointMethodDescriptor); methodDescriptors.add(listIndexEndpointsMethodDescriptor); methodDescriptors.add(updateIndexEndpointMethodDescriptor); methodDescriptors.add(deleteIndexEndpointMethodDescriptor); methodDescriptors.add(deployIndexMethodDescriptor); methodDescriptors.add(undeployIndexMethodDescriptor); methodDescriptors.add(createCollectionMethodDescriptor); methodDescriptors.add(deleteCollectionMethodDescriptor); methodDescriptors.add(getCollectionMethodDescriptor); methodDescriptors.add(updateCollectionMethodDescriptor); methodDescriptors.add(listCollectionsMethodDescriptor); methodDescriptors.add(addCollectionItemMethodDescriptor); methodDescriptors.add(removeCollectionItemMethodDescriptor); methodDescriptors.add(viewCollectionItemsMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable createAssetCallable() { return createAssetCallable; } @Override public UnaryCallable updateAssetCallable() { return updateAssetCallable; } @Override public UnaryCallable getAssetCallable() { return getAssetCallable; } @Override public UnaryCallable listAssetsCallable() { return listAssetsCallable; } @Override public UnaryCallable listAssetsPagedCallable() { return listAssetsPagedCallable; } @Override public UnaryCallable deleteAssetCallable() { return deleteAssetCallable; } @Override public OperationCallable deleteAssetOperationCallable() { return deleteAssetOperationCallable; } @Override public UnaryCallable uploadAssetCallable() { return uploadAssetCallable; } @Override public OperationCallable uploadAssetOperationCallable() { return uploadAssetOperationCallable; } @Override public UnaryCallable generateRetrievalUrlCallable() { return generateRetrievalUrlCallable; } @Override public UnaryCallable analyzeAssetCallable() { return analyzeAssetCallable; } @Override public OperationCallable analyzeAssetOperationCallable() { return analyzeAssetOperationCallable; } @Override public UnaryCallable indexAssetCallable() { return indexAssetCallable; } @Override public OperationCallable indexAssetOperationCallable() { return indexAssetOperationCallable; } @Override public UnaryCallable removeIndexAssetCallable() { return removeIndexAssetCallable; } @Override public OperationCallable< RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> removeIndexAssetOperationCallable() { return removeIndexAssetOperationCallable; } @Override public UnaryCallable viewIndexedAssetsCallable() { return viewIndexedAssetsCallable; } @Override public UnaryCallable viewIndexedAssetsPagedCallable() { return viewIndexedAssetsPagedCallable; } @Override public UnaryCallable createIndexCallable() { return createIndexCallable; } @Override public OperationCallable createIndexOperationCallable() { return createIndexOperationCallable; } @Override public UnaryCallable updateIndexCallable() { return updateIndexCallable; } @Override public OperationCallable updateIndexOperationCallable() { return updateIndexOperationCallable; } @Override public UnaryCallable getIndexCallable() { return getIndexCallable; } @Override public UnaryCallable listIndexesCallable() { return listIndexesCallable; } @Override public UnaryCallable listIndexesPagedCallable() { return listIndexesPagedCallable; } @Override public UnaryCallable deleteIndexCallable() { return deleteIndexCallable; } @Override public OperationCallable deleteIndexOperationCallable() { return deleteIndexOperationCallable; } @Override public UnaryCallable createCorpusCallable() { return createCorpusCallable; } @Override public OperationCallable createCorpusOperationCallable() { return createCorpusOperationCallable; } @Override public UnaryCallable getCorpusCallable() { return getCorpusCallable; } @Override public UnaryCallable updateCorpusCallable() { return updateCorpusCallable; } @Override public UnaryCallable listCorporaCallable() { return listCorporaCallable; } @Override public UnaryCallable listCorporaPagedCallable() { return listCorporaPagedCallable; } @Override public UnaryCallable deleteCorpusCallable() { return deleteCorpusCallable; } @Override public UnaryCallable analyzeCorpusCallable() { return analyzeCorpusCallable; } @Override public OperationCallable analyzeCorpusOperationCallable() { return analyzeCorpusOperationCallable; } @Override public UnaryCallable createDataSchemaCallable() { return createDataSchemaCallable; } @Override public UnaryCallable updateDataSchemaCallable() { return updateDataSchemaCallable; } @Override public UnaryCallable getDataSchemaCallable() { return getDataSchemaCallable; } @Override public UnaryCallable deleteDataSchemaCallable() { return deleteDataSchemaCallable; } @Override public UnaryCallable listDataSchemasCallable() { return listDataSchemasCallable; } @Override public UnaryCallable listDataSchemasPagedCallable() { return listDataSchemasPagedCallable; } @Override public UnaryCallable createAnnotationCallable() { return createAnnotationCallable; } @Override public UnaryCallable getAnnotationCallable() { return getAnnotationCallable; } @Override public UnaryCallable listAnnotationsCallable() { return listAnnotationsCallable; } @Override public UnaryCallable listAnnotationsPagedCallable() { return listAnnotationsPagedCallable; } @Override public UnaryCallable updateAnnotationCallable() { return updateAnnotationCallable; } @Override public UnaryCallable deleteAnnotationCallable() { return deleteAnnotationCallable; } @Override public UnaryCallable clipAssetCallable() { return clipAssetCallable; } @Override public UnaryCallable generateHlsUriCallable() { return generateHlsUriCallable; } @Override public UnaryCallable importAssetsCallable() { return importAssetsCallable; } @Override public OperationCallable importAssetsOperationCallable() { return importAssetsOperationCallable; } @Override public UnaryCallable createSearchConfigCallable() { return createSearchConfigCallable; } @Override public UnaryCallable updateSearchConfigCallable() { return updateSearchConfigCallable; } @Override public UnaryCallable getSearchConfigCallable() { return getSearchConfigCallable; } @Override public UnaryCallable deleteSearchConfigCallable() { return deleteSearchConfigCallable; } @Override public UnaryCallable listSearchConfigsCallable() { return listSearchConfigsCallable; } @Override public UnaryCallable listSearchConfigsPagedCallable() { return listSearchConfigsPagedCallable; } @Override public UnaryCallable createSearchHypernymCallable() { return createSearchHypernymCallable; } @Override public UnaryCallable updateSearchHypernymCallable() { return updateSearchHypernymCallable; } @Override public UnaryCallable getSearchHypernymCallable() { return getSearchHypernymCallable; } @Override public UnaryCallable deleteSearchHypernymCallable() { return deleteSearchHypernymCallable; } @Override public UnaryCallable listSearchHypernymsCallable() { return listSearchHypernymsCallable; } @Override public UnaryCallable listSearchHypernymsPagedCallable() { return listSearchHypernymsPagedCallable; } @Override public UnaryCallable searchAssetsCallable() { return searchAssetsCallable; } @Override public UnaryCallable searchAssetsPagedCallable() { return searchAssetsPagedCallable; } @Override public UnaryCallable searchIndexEndpointCallable() { return searchIndexEndpointCallable; } @Override public UnaryCallable searchIndexEndpointPagedCallable() { return searchIndexEndpointPagedCallable; } @Override public UnaryCallable createIndexEndpointCallable() { return createIndexEndpointCallable; } @Override public OperationCallable createIndexEndpointOperationCallable() { return createIndexEndpointOperationCallable; } @Override public UnaryCallable getIndexEndpointCallable() { return getIndexEndpointCallable; } @Override public UnaryCallable listIndexEndpointsCallable() { return listIndexEndpointsCallable; } @Override public UnaryCallable listIndexEndpointsPagedCallable() { return listIndexEndpointsPagedCallable; } @Override public UnaryCallable updateIndexEndpointCallable() { return updateIndexEndpointCallable; } @Override public OperationCallable updateIndexEndpointOperationCallable() { return updateIndexEndpointOperationCallable; } @Override public UnaryCallable deleteIndexEndpointCallable() { return deleteIndexEndpointCallable; } @Override public OperationCallable deleteIndexEndpointOperationCallable() { return deleteIndexEndpointOperationCallable; } @Override public UnaryCallable deployIndexCallable() { return deployIndexCallable; } @Override public OperationCallable deployIndexOperationCallable() { return deployIndexOperationCallable; } @Override public UnaryCallable undeployIndexCallable() { return undeployIndexCallable; } @Override public OperationCallable undeployIndexOperationCallable() { return undeployIndexOperationCallable; } @Override public UnaryCallable createCollectionCallable() { return createCollectionCallable; } @Override public OperationCallable createCollectionOperationCallable() { return createCollectionOperationCallable; } @Override public UnaryCallable deleteCollectionCallable() { return deleteCollectionCallable; } @Override public OperationCallable deleteCollectionOperationCallable() { return deleteCollectionOperationCallable; } @Override public UnaryCallable getCollectionCallable() { return getCollectionCallable; } @Override public UnaryCallable updateCollectionCallable() { return updateCollectionCallable; } @Override public UnaryCallable listCollectionsCallable() { return listCollectionsCallable; } @Override public UnaryCallable listCollectionsPagedCallable() { return listCollectionsPagedCallable; } @Override public UnaryCallable addCollectionItemCallable() { return addCollectionItemCallable; } @Override public UnaryCallable removeCollectionItemCallable() { return removeCollectionItemCallable; } @Override public UnaryCallable viewCollectionItemsCallable() { return viewCollectionItemsCallable; } @Override public UnaryCallable viewCollectionItemsPagedCallable() { return viewCollectionItemsPagedCallable; } @Override public BidiStreamingCallable ingestAssetCallable() { throw new UnsupportedOperationException( "Not implemented: ingestAssetCallable(). REST transport is not implemented for this method yet."); } @Override public final void close() { try { backgroundResources.close(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Failed to close resource", e); } } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy