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

com.google.cloud.dataplex.v1.stub.GrpcCatalogServiceStub Maven / Gradle / Ivy

Go to download

Cloud Dataplex provides intelligent data fabric that enables organizations to centrally manage, monitor, and govern their data across data lakes, data warehouses, and data marts with consistent controls, providing access to trusted data and powering analytics at scale.

The newest version!
/*
 * 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.dataplex.v1.stub;

import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListAspectTypesPagedResponse;
import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntriesPagedResponse;
import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntryGroupsPagedResponse;
import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntryTypesPagedResponse;
import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.CatalogServiceClient.SearchEntriesPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
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.dataplex.v1.AspectType;
import com.google.cloud.dataplex.v1.CreateAspectTypeRequest;
import com.google.cloud.dataplex.v1.CreateEntryGroupRequest;
import com.google.cloud.dataplex.v1.CreateEntryRequest;
import com.google.cloud.dataplex.v1.CreateEntryTypeRequest;
import com.google.cloud.dataplex.v1.DeleteAspectTypeRequest;
import com.google.cloud.dataplex.v1.DeleteEntryGroupRequest;
import com.google.cloud.dataplex.v1.DeleteEntryRequest;
import com.google.cloud.dataplex.v1.DeleteEntryTypeRequest;
import com.google.cloud.dataplex.v1.Entry;
import com.google.cloud.dataplex.v1.EntryGroup;
import com.google.cloud.dataplex.v1.EntryType;
import com.google.cloud.dataplex.v1.GetAspectTypeRequest;
import com.google.cloud.dataplex.v1.GetEntryGroupRequest;
import com.google.cloud.dataplex.v1.GetEntryRequest;
import com.google.cloud.dataplex.v1.GetEntryTypeRequest;
import com.google.cloud.dataplex.v1.ListAspectTypesRequest;
import com.google.cloud.dataplex.v1.ListAspectTypesResponse;
import com.google.cloud.dataplex.v1.ListEntriesRequest;
import com.google.cloud.dataplex.v1.ListEntriesResponse;
import com.google.cloud.dataplex.v1.ListEntryGroupsRequest;
import com.google.cloud.dataplex.v1.ListEntryGroupsResponse;
import com.google.cloud.dataplex.v1.ListEntryTypesRequest;
import com.google.cloud.dataplex.v1.ListEntryTypesResponse;
import com.google.cloud.dataplex.v1.LookupEntryRequest;
import com.google.cloud.dataplex.v1.OperationMetadata;
import com.google.cloud.dataplex.v1.SearchEntriesRequest;
import com.google.cloud.dataplex.v1.SearchEntriesResponse;
import com.google.cloud.dataplex.v1.UpdateAspectTypeRequest;
import com.google.cloud.dataplex.v1.UpdateEntryGroupRequest;
import com.google.cloud.dataplex.v1.UpdateEntryRequest;
import com.google.cloud.dataplex.v1.UpdateEntryTypeRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the CatalogService service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class GrpcCatalogServiceStub extends CatalogServiceStub { private static final MethodDescriptor createEntryTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/CreateEntryType") .setRequestMarshaller( ProtoUtils.marshaller(CreateEntryTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor updateEntryTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/UpdateEntryType") .setRequestMarshaller( ProtoUtils.marshaller(UpdateEntryTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteEntryTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/DeleteEntryType") .setRequestMarshaller( ProtoUtils.marshaller(DeleteEntryTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listEntryTypesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/ListEntryTypes") .setRequestMarshaller( ProtoUtils.marshaller(ListEntryTypesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListEntryTypesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getEntryTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/GetEntryType") .setRequestMarshaller(ProtoUtils.marshaller(GetEntryTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EntryType.getDefaultInstance())) .build(); private static final MethodDescriptor createAspectTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/CreateAspectType") .setRequestMarshaller( ProtoUtils.marshaller(CreateAspectTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor updateAspectTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/UpdateAspectType") .setRequestMarshaller( ProtoUtils.marshaller(UpdateAspectTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteAspectTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/DeleteAspectType") .setRequestMarshaller( ProtoUtils.marshaller(DeleteAspectTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listAspectTypesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/ListAspectTypes") .setRequestMarshaller( ProtoUtils.marshaller(ListAspectTypesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListAspectTypesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getAspectTypeMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/GetAspectType") .setRequestMarshaller( ProtoUtils.marshaller(GetAspectTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(AspectType.getDefaultInstance())) .build(); private static final MethodDescriptor createEntryGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/CreateEntryGroup") .setRequestMarshaller( ProtoUtils.marshaller(CreateEntryGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor updateEntryGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/UpdateEntryGroup") .setRequestMarshaller( ProtoUtils.marshaller(UpdateEntryGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteEntryGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/DeleteEntryGroup") .setRequestMarshaller( ProtoUtils.marshaller(DeleteEntryGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listEntryGroupsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/ListEntryGroups") .setRequestMarshaller( ProtoUtils.marshaller(ListEntryGroupsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListEntryGroupsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getEntryGroupMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/GetEntryGroup") .setRequestMarshaller( ProtoUtils.marshaller(GetEntryGroupRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EntryGroup.getDefaultInstance())) .build(); private static final MethodDescriptor createEntryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/CreateEntry") .setRequestMarshaller(ProtoUtils.marshaller(CreateEntryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) .build(); private static final MethodDescriptor updateEntryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/UpdateEntry") .setRequestMarshaller(ProtoUtils.marshaller(UpdateEntryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) .build(); private static final MethodDescriptor deleteEntryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/DeleteEntry") .setRequestMarshaller(ProtoUtils.marshaller(DeleteEntryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) .build(); private static final MethodDescriptor listEntriesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/ListEntries") .setRequestMarshaller(ProtoUtils.marshaller(ListEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListEntriesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getEntryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/GetEntry") .setRequestMarshaller(ProtoUtils.marshaller(GetEntryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) .build(); private static final MethodDescriptor lookupEntryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/LookupEntry") .setRequestMarshaller(ProtoUtils.marshaller(LookupEntryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Entry.getDefaultInstance())) .build(); private static final MethodDescriptor searchEntriesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.dataplex.v1.CatalogService/SearchEntries") .setRequestMarshaller( ProtoUtils.marshaller(SearchEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SearchEntriesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/ListLocations") .setRequestMarshaller( ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getLocationMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) .build(); private final UnaryCallable createEntryTypeCallable; private final OperationCallable createEntryTypeOperationCallable; private final UnaryCallable updateEntryTypeCallable; private final OperationCallable updateEntryTypeOperationCallable; private final UnaryCallable deleteEntryTypeCallable; private final OperationCallable deleteEntryTypeOperationCallable; private final UnaryCallable listEntryTypesCallable; private final UnaryCallable listEntryTypesPagedCallable; private final UnaryCallable getEntryTypeCallable; private final UnaryCallable createAspectTypeCallable; private final OperationCallable createAspectTypeOperationCallable; private final UnaryCallable updateAspectTypeCallable; private final OperationCallable updateAspectTypeOperationCallable; private final UnaryCallable deleteAspectTypeCallable; private final OperationCallable deleteAspectTypeOperationCallable; private final UnaryCallable listAspectTypesCallable; private final UnaryCallable listAspectTypesPagedCallable; private final UnaryCallable getAspectTypeCallable; private final UnaryCallable createEntryGroupCallable; private final OperationCallable createEntryGroupOperationCallable; private final UnaryCallable updateEntryGroupCallable; private final OperationCallable updateEntryGroupOperationCallable; private final UnaryCallable deleteEntryGroupCallable; private final OperationCallable deleteEntryGroupOperationCallable; private final UnaryCallable listEntryGroupsCallable; private final UnaryCallable listEntryGroupsPagedCallable; private final UnaryCallable getEntryGroupCallable; private final UnaryCallable createEntryCallable; private final UnaryCallable updateEntryCallable; private final UnaryCallable deleteEntryCallable; private final UnaryCallable listEntriesCallable; private final UnaryCallable listEntriesPagedCallable; private final UnaryCallable getEntryCallable; private final UnaryCallable lookupEntryCallable; private final UnaryCallable searchEntriesCallable; private final UnaryCallable searchEntriesPagedCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcCatalogServiceStub create(CatalogServiceStubSettings settings) throws IOException { return new GrpcCatalogServiceStub(settings, ClientContext.create(settings)); } public static final GrpcCatalogServiceStub create(ClientContext clientContext) throws IOException { return new GrpcCatalogServiceStub( CatalogServiceStubSettings.newBuilder().build(), clientContext); } public static final GrpcCatalogServiceStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcCatalogServiceStub( CatalogServiceStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcCatalogServiceStub, 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 GrpcCatalogServiceStub(CatalogServiceStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcCatalogServiceCallableFactory()); } /** * Constructs an instance of GrpcCatalogServiceStub, 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 GrpcCatalogServiceStub( CatalogServiceStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings createEntryTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntryTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateEntryTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntryTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("entry_type.name", String.valueOf(request.getEntryType().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteEntryTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntryTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listEntryTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntryTypesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getEntryTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntryTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createAspectTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createAspectTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateAspectTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateAspectTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "aspect_type.name", String.valueOf(request.getAspectType().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteAspectTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAspectTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listAspectTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listAspectTypesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getAspectTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAspectTypeMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createEntryGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntryGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateEntryGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntryGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "entry_group.name", String.valueOf(request.getEntryGroup().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteEntryGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntryGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listEntryGroupsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntryGroupsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getEntryGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntryGroupMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createEntryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings updateEntryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("entry.name", String.valueOf(request.getEntry().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteEntryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listEntriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntriesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getEntryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings lookupEntryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(lookupEntryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings searchEntriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(searchEntriesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings getLocationTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getLocationMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); this.createEntryTypeCallable = callableFactory.createUnaryCallable( createEntryTypeTransportSettings, settings.createEntryTypeSettings(), clientContext); this.createEntryTypeOperationCallable = callableFactory.createOperationCallable( createEntryTypeTransportSettings, settings.createEntryTypeOperationSettings(), clientContext, operationsStub); this.updateEntryTypeCallable = callableFactory.createUnaryCallable( updateEntryTypeTransportSettings, settings.updateEntryTypeSettings(), clientContext); this.updateEntryTypeOperationCallable = callableFactory.createOperationCallable( updateEntryTypeTransportSettings, settings.updateEntryTypeOperationSettings(), clientContext, operationsStub); this.deleteEntryTypeCallable = callableFactory.createUnaryCallable( deleteEntryTypeTransportSettings, settings.deleteEntryTypeSettings(), clientContext); this.deleteEntryTypeOperationCallable = callableFactory.createOperationCallable( deleteEntryTypeTransportSettings, settings.deleteEntryTypeOperationSettings(), clientContext, operationsStub); this.listEntryTypesCallable = callableFactory.createUnaryCallable( listEntryTypesTransportSettings, settings.listEntryTypesSettings(), clientContext); this.listEntryTypesPagedCallable = callableFactory.createPagedCallable( listEntryTypesTransportSettings, settings.listEntryTypesSettings(), clientContext); this.getEntryTypeCallable = callableFactory.createUnaryCallable( getEntryTypeTransportSettings, settings.getEntryTypeSettings(), clientContext); this.createAspectTypeCallable = callableFactory.createUnaryCallable( createAspectTypeTransportSettings, settings.createAspectTypeSettings(), clientContext); this.createAspectTypeOperationCallable = callableFactory.createOperationCallable( createAspectTypeTransportSettings, settings.createAspectTypeOperationSettings(), clientContext, operationsStub); this.updateAspectTypeCallable = callableFactory.createUnaryCallable( updateAspectTypeTransportSettings, settings.updateAspectTypeSettings(), clientContext); this.updateAspectTypeOperationCallable = callableFactory.createOperationCallable( updateAspectTypeTransportSettings, settings.updateAspectTypeOperationSettings(), clientContext, operationsStub); this.deleteAspectTypeCallable = callableFactory.createUnaryCallable( deleteAspectTypeTransportSettings, settings.deleteAspectTypeSettings(), clientContext); this.deleteAspectTypeOperationCallable = callableFactory.createOperationCallable( deleteAspectTypeTransportSettings, settings.deleteAspectTypeOperationSettings(), clientContext, operationsStub); this.listAspectTypesCallable = callableFactory.createUnaryCallable( listAspectTypesTransportSettings, settings.listAspectTypesSettings(), clientContext); this.listAspectTypesPagedCallable = callableFactory.createPagedCallable( listAspectTypesTransportSettings, settings.listAspectTypesSettings(), clientContext); this.getAspectTypeCallable = callableFactory.createUnaryCallable( getAspectTypeTransportSettings, settings.getAspectTypeSettings(), clientContext); this.createEntryGroupCallable = callableFactory.createUnaryCallable( createEntryGroupTransportSettings, settings.createEntryGroupSettings(), clientContext); this.createEntryGroupOperationCallable = callableFactory.createOperationCallable( createEntryGroupTransportSettings, settings.createEntryGroupOperationSettings(), clientContext, operationsStub); this.updateEntryGroupCallable = callableFactory.createUnaryCallable( updateEntryGroupTransportSettings, settings.updateEntryGroupSettings(), clientContext); this.updateEntryGroupOperationCallable = callableFactory.createOperationCallable( updateEntryGroupTransportSettings, settings.updateEntryGroupOperationSettings(), clientContext, operationsStub); this.deleteEntryGroupCallable = callableFactory.createUnaryCallable( deleteEntryGroupTransportSettings, settings.deleteEntryGroupSettings(), clientContext); this.deleteEntryGroupOperationCallable = callableFactory.createOperationCallable( deleteEntryGroupTransportSettings, settings.deleteEntryGroupOperationSettings(), clientContext, operationsStub); this.listEntryGroupsCallable = callableFactory.createUnaryCallable( listEntryGroupsTransportSettings, settings.listEntryGroupsSettings(), clientContext); this.listEntryGroupsPagedCallable = callableFactory.createPagedCallable( listEntryGroupsTransportSettings, settings.listEntryGroupsSettings(), clientContext); this.getEntryGroupCallable = callableFactory.createUnaryCallable( getEntryGroupTransportSettings, settings.getEntryGroupSettings(), clientContext); this.createEntryCallable = callableFactory.createUnaryCallable( createEntryTransportSettings, settings.createEntrySettings(), clientContext); this.updateEntryCallable = callableFactory.createUnaryCallable( updateEntryTransportSettings, settings.updateEntrySettings(), clientContext); this.deleteEntryCallable = callableFactory.createUnaryCallable( deleteEntryTransportSettings, settings.deleteEntrySettings(), clientContext); this.listEntriesCallable = callableFactory.createUnaryCallable( listEntriesTransportSettings, settings.listEntriesSettings(), clientContext); this.listEntriesPagedCallable = callableFactory.createPagedCallable( listEntriesTransportSettings, settings.listEntriesSettings(), clientContext); this.getEntryCallable = callableFactory.createUnaryCallable( getEntryTransportSettings, settings.getEntrySettings(), clientContext); this.lookupEntryCallable = callableFactory.createUnaryCallable( lookupEntryTransportSettings, settings.lookupEntrySettings(), clientContext); this.searchEntriesCallable = callableFactory.createUnaryCallable( searchEntriesTransportSettings, settings.searchEntriesSettings(), clientContext); this.searchEntriesPagedCallable = callableFactory.createPagedCallable( searchEntriesTransportSettings, settings.searchEntriesSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.listLocationsPagedCallable = callableFactory.createPagedCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.getLocationCallable = callableFactory.createUnaryCallable( getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public GrpcOperationsStub getOperationsStub() { return operationsStub; } @Override public UnaryCallable createEntryTypeCallable() { return createEntryTypeCallable; } @Override public OperationCallable createEntryTypeOperationCallable() { return createEntryTypeOperationCallable; } @Override public UnaryCallable updateEntryTypeCallable() { return updateEntryTypeCallable; } @Override public OperationCallable updateEntryTypeOperationCallable() { return updateEntryTypeOperationCallable; } @Override public UnaryCallable deleteEntryTypeCallable() { return deleteEntryTypeCallable; } @Override public OperationCallable deleteEntryTypeOperationCallable() { return deleteEntryTypeOperationCallable; } @Override public UnaryCallable listEntryTypesCallable() { return listEntryTypesCallable; } @Override public UnaryCallable listEntryTypesPagedCallable() { return listEntryTypesPagedCallable; } @Override public UnaryCallable getEntryTypeCallable() { return getEntryTypeCallable; } @Override public UnaryCallable createAspectTypeCallable() { return createAspectTypeCallable; } @Override public OperationCallable createAspectTypeOperationCallable() { return createAspectTypeOperationCallable; } @Override public UnaryCallable updateAspectTypeCallable() { return updateAspectTypeCallable; } @Override public OperationCallable updateAspectTypeOperationCallable() { return updateAspectTypeOperationCallable; } @Override public UnaryCallable deleteAspectTypeCallable() { return deleteAspectTypeCallable; } @Override public OperationCallable deleteAspectTypeOperationCallable() { return deleteAspectTypeOperationCallable; } @Override public UnaryCallable listAspectTypesCallable() { return listAspectTypesCallable; } @Override public UnaryCallable listAspectTypesPagedCallable() { return listAspectTypesPagedCallable; } @Override public UnaryCallable getAspectTypeCallable() { return getAspectTypeCallable; } @Override public UnaryCallable createEntryGroupCallable() { return createEntryGroupCallable; } @Override public OperationCallable createEntryGroupOperationCallable() { return createEntryGroupOperationCallable; } @Override public UnaryCallable updateEntryGroupCallable() { return updateEntryGroupCallable; } @Override public OperationCallable updateEntryGroupOperationCallable() { return updateEntryGroupOperationCallable; } @Override public UnaryCallable deleteEntryGroupCallable() { return deleteEntryGroupCallable; } @Override public OperationCallable deleteEntryGroupOperationCallable() { return deleteEntryGroupOperationCallable; } @Override public UnaryCallable listEntryGroupsCallable() { return listEntryGroupsCallable; } @Override public UnaryCallable listEntryGroupsPagedCallable() { return listEntryGroupsPagedCallable; } @Override public UnaryCallable getEntryGroupCallable() { return getEntryGroupCallable; } @Override public UnaryCallable createEntryCallable() { return createEntryCallable; } @Override public UnaryCallable updateEntryCallable() { return updateEntryCallable; } @Override public UnaryCallable deleteEntryCallable() { return deleteEntryCallable; } @Override public UnaryCallable listEntriesCallable() { return listEntriesCallable; } @Override public UnaryCallable listEntriesPagedCallable() { return listEntriesPagedCallable; } @Override public UnaryCallable getEntryCallable() { return getEntryCallable; } @Override public UnaryCallable lookupEntryCallable() { return lookupEntryCallable; } @Override public UnaryCallable searchEntriesCallable() { return searchEntriesCallable; } @Override public UnaryCallable searchEntriesPagedCallable() { return searchEntriesPagedCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @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