com.google.cloud.bigquery.dataexchange.v1beta1.stub.GrpcAnalyticsHubServiceStub Maven / Gradle / Ivy
Show all versions of google-cloud-bigquery-data-exchange Show documentation
/*
* 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.bigquery.dataexchange.v1beta1.stub;
import static com.google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse;
import static com.google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubServiceClient.ListListingsPagedResponse;
import static com.google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse;
import com.google.api.core.BetaApi;
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.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.DataExchange;
import com.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse;
import com.google.cloud.bigquery.dataexchange.v1beta1.Listing;
import com.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse;
import com.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest;
import com.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest;
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.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
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 AnalyticsHubService service API.
*
* This class is for advanced usage and reflects the underlying API directly.
*/
@BetaApi
@Generated("by gapic-generator-java")
public class GrpcAnalyticsHubServiceStub extends AnalyticsHubServiceStub {
private static final MethodDescriptor
listDataExchangesMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListDataExchanges")
.setRequestMarshaller(
ProtoUtils.marshaller(ListDataExchangesRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListDataExchangesResponse.getDefaultInstance()))
.build();
private static final MethodDescriptor
listOrgDataExchangesMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListOrgDataExchanges")
.setRequestMarshaller(
ProtoUtils.marshaller(ListOrgDataExchangesRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListOrgDataExchangesResponse.getDefaultInstance()))
.build();
private static final MethodDescriptor
getDataExchangeMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetDataExchange")
.setRequestMarshaller(
ProtoUtils.marshaller(GetDataExchangeRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance()))
.build();
private static final MethodDescriptor
createDataExchangeMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateDataExchange")
.setRequestMarshaller(
ProtoUtils.marshaller(CreateDataExchangeRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance()))
.build();
private static final MethodDescriptor
updateDataExchangeMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateDataExchange")
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateDataExchangeRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(DataExchange.getDefaultInstance()))
.build();
private static final MethodDescriptor
deleteDataExchangeMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteDataExchange")
.setRequestMarshaller(
ProtoUtils.marshaller(DeleteDataExchangeRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
.build();
private static final MethodDescriptor
listListingsMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/ListListings")
.setRequestMarshaller(ProtoUtils.marshaller(ListListingsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(ListListingsResponse.getDefaultInstance()))
.build();
private static final MethodDescriptor getListingMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetListing")
.setRequestMarshaller(ProtoUtils.marshaller(GetListingRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance()))
.build();
private static final MethodDescriptor
createListingMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/CreateListing")
.setRequestMarshaller(
ProtoUtils.marshaller(CreateListingRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance()))
.build();
private static final MethodDescriptor
updateListingMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/UpdateListing")
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateListingRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Listing.getDefaultInstance()))
.build();
private static final MethodDescriptor deleteListingMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/DeleteListing")
.setRequestMarshaller(ProtoUtils.marshaller(DeleteListingRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
.build();
private static final MethodDescriptor
subscribeListingMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/SubscribeListing")
.setRequestMarshaller(
ProtoUtils.marshaller(SubscribeListingRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(SubscribeListingResponse.getDefaultInstance()))
.build();
private static final MethodDescriptor getIamPolicyMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/GetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
.build();
private static final MethodDescriptor setIamPolicyMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/SetIamPolicy")
.setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
.build();
private static final MethodDescriptor
testIamPermissionsMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
"google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService/TestIamPermissions")
.setRequestMarshaller(
ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(TestIamPermissionsResponse.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
listDataExchangesCallable;
private final UnaryCallable
listDataExchangesPagedCallable;
private final UnaryCallable
listOrgDataExchangesCallable;
private final UnaryCallable
listOrgDataExchangesPagedCallable;
private final UnaryCallable getDataExchangeCallable;
private final UnaryCallable createDataExchangeCallable;
private final UnaryCallable updateDataExchangeCallable;
private final UnaryCallable deleteDataExchangeCallable;
private final UnaryCallable listListingsCallable;
private final UnaryCallable
listListingsPagedCallable;
private final UnaryCallable getListingCallable;
private final UnaryCallable createListingCallable;
private final UnaryCallable updateListingCallable;
private final UnaryCallable deleteListingCallable;
private final UnaryCallable
subscribeListingCallable;
private final UnaryCallable getIamPolicyCallable;
private final UnaryCallable setIamPolicyCallable;
private final UnaryCallable
testIamPermissionsCallable;
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 GrpcAnalyticsHubServiceStub create(AnalyticsHubServiceStubSettings settings)
throws IOException {
return new GrpcAnalyticsHubServiceStub(settings, ClientContext.create(settings));
}
public static final GrpcAnalyticsHubServiceStub create(ClientContext clientContext)
throws IOException {
return new GrpcAnalyticsHubServiceStub(
AnalyticsHubServiceStubSettings.newBuilder().build(), clientContext);
}
public static final GrpcAnalyticsHubServiceStub create(
ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
return new GrpcAnalyticsHubServiceStub(
AnalyticsHubServiceStubSettings.newBuilder().build(), clientContext, callableFactory);
}
/**
* Constructs an instance of GrpcAnalyticsHubServiceStub, 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 GrpcAnalyticsHubServiceStub(
AnalyticsHubServiceStubSettings settings, ClientContext clientContext) throws IOException {
this(settings, clientContext, new GrpcAnalyticsHubServiceCallableFactory());
}
/**
* Constructs an instance of GrpcAnalyticsHubServiceStub, 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 GrpcAnalyticsHubServiceStub(
AnalyticsHubServiceStubSettings settings,
ClientContext clientContext,
GrpcStubCallableFactory callableFactory)
throws IOException {
this.callableFactory = callableFactory;
this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
GrpcCallSettings
listDataExchangesTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listDataExchangesMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("parent", String.valueOf(request.getParent()));
return builder.build();
})
.build();
GrpcCallSettings
listOrgDataExchangesTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listOrgDataExchangesMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("organization", String.valueOf(request.getOrganization()));
return builder.build();
})
.build();
GrpcCallSettings getDataExchangeTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getDataExchangeMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("name", String.valueOf(request.getName()));
return builder.build();
})
.build();
GrpcCallSettings createDataExchangeTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createDataExchangeMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("parent", String.valueOf(request.getParent()));
return builder.build();
})
.build();
GrpcCallSettings updateDataExchangeTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateDataExchangeMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(
"data_exchange.name", String.valueOf(request.getDataExchange().getName()));
return builder.build();
})
.build();
GrpcCallSettings deleteDataExchangeTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteDataExchangeMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("name", String.valueOf(request.getName()));
return builder.build();
})
.build();
GrpcCallSettings listListingsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listListingsMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("parent", String.valueOf(request.getParent()));
return builder.build();
})
.build();
GrpcCallSettings getListingTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getListingMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("name", String.valueOf(request.getName()));
return builder.build();
})
.build();
GrpcCallSettings createListingTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createListingMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("parent", String.valueOf(request.getParent()));
return builder.build();
})
.build();
GrpcCallSettings updateListingTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateListingMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("listing.name", String.valueOf(request.getListing().getName()));
return builder.build();
})
.build();
GrpcCallSettings deleteListingTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteListingMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("name", String.valueOf(request.getName()));
return builder.build();
})
.build();
GrpcCallSettings
subscribeListingTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(subscribeListingMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("name", String.valueOf(request.getName()));
return builder.build();
})
.build();
GrpcCallSettings getIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("resource", String.valueOf(request.getResource()));
return builder.build();
})
.build();
GrpcCallSettings setIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("resource", String.valueOf(request.getResource()));
return builder.build();
})
.build();
GrpcCallSettings
testIamPermissionsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("resource", String.valueOf(request.getResource()));
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.listDataExchangesCallable =
callableFactory.createUnaryCallable(
listDataExchangesTransportSettings,
settings.listDataExchangesSettings(),
clientContext);
this.listDataExchangesPagedCallable =
callableFactory.createPagedCallable(
listDataExchangesTransportSettings,
settings.listDataExchangesSettings(),
clientContext);
this.listOrgDataExchangesCallable =
callableFactory.createUnaryCallable(
listOrgDataExchangesTransportSettings,
settings.listOrgDataExchangesSettings(),
clientContext);
this.listOrgDataExchangesPagedCallable =
callableFactory.createPagedCallable(
listOrgDataExchangesTransportSettings,
settings.listOrgDataExchangesSettings(),
clientContext);
this.getDataExchangeCallable =
callableFactory.createUnaryCallable(
getDataExchangeTransportSettings, settings.getDataExchangeSettings(), clientContext);
this.createDataExchangeCallable =
callableFactory.createUnaryCallable(
createDataExchangeTransportSettings,
settings.createDataExchangeSettings(),
clientContext);
this.updateDataExchangeCallable =
callableFactory.createUnaryCallable(
updateDataExchangeTransportSettings,
settings.updateDataExchangeSettings(),
clientContext);
this.deleteDataExchangeCallable =
callableFactory.createUnaryCallable(
deleteDataExchangeTransportSettings,
settings.deleteDataExchangeSettings(),
clientContext);
this.listListingsCallable =
callableFactory.createUnaryCallable(
listListingsTransportSettings, settings.listListingsSettings(), clientContext);
this.listListingsPagedCallable =
callableFactory.createPagedCallable(
listListingsTransportSettings, settings.listListingsSettings(), clientContext);
this.getListingCallable =
callableFactory.createUnaryCallable(
getListingTransportSettings, settings.getListingSettings(), clientContext);
this.createListingCallable =
callableFactory.createUnaryCallable(
createListingTransportSettings, settings.createListingSettings(), clientContext);
this.updateListingCallable =
callableFactory.createUnaryCallable(
updateListingTransportSettings, settings.updateListingSettings(), clientContext);
this.deleteListingCallable =
callableFactory.createUnaryCallable(
deleteListingTransportSettings, settings.deleteListingSettings(), clientContext);
this.subscribeListingCallable =
callableFactory.createUnaryCallable(
subscribeListingTransportSettings, settings.subscribeListingSettings(), clientContext);
this.getIamPolicyCallable =
callableFactory.createUnaryCallable(
getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
this.setIamPolicyCallable =
callableFactory.createUnaryCallable(
setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
this.testIamPermissionsCallable =
callableFactory.createUnaryCallable(
testIamPermissionsTransportSettings,
settings.testIamPermissionsSettings(),
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
listDataExchangesCallable() {
return listDataExchangesCallable;
}
@Override
public UnaryCallable
listDataExchangesPagedCallable() {
return listDataExchangesPagedCallable;
}
@Override
public UnaryCallable
listOrgDataExchangesCallable() {
return listOrgDataExchangesCallable;
}
@Override
public UnaryCallable
listOrgDataExchangesPagedCallable() {
return listOrgDataExchangesPagedCallable;
}
@Override
public UnaryCallable getDataExchangeCallable() {
return getDataExchangeCallable;
}
@Override
public UnaryCallable createDataExchangeCallable() {
return createDataExchangeCallable;
}
@Override
public UnaryCallable updateDataExchangeCallable() {
return updateDataExchangeCallable;
}
@Override
public UnaryCallable deleteDataExchangeCallable() {
return deleteDataExchangeCallable;
}
@Override
public UnaryCallable listListingsCallable() {
return listListingsCallable;
}
@Override
public UnaryCallable listListingsPagedCallable() {
return listListingsPagedCallable;
}
@Override
public UnaryCallable getListingCallable() {
return getListingCallable;
}
@Override
public UnaryCallable createListingCallable() {
return createListingCallable;
}
@Override
public UnaryCallable updateListingCallable() {
return updateListingCallable;
}
@Override
public UnaryCallable deleteListingCallable() {
return deleteListingCallable;
}
@Override
public UnaryCallable
subscribeListingCallable() {
return subscribeListingCallable;
}
@Override
public UnaryCallable getIamPolicyCallable() {
return getIamPolicyCallable;
}
@Override
public UnaryCallable setIamPolicyCallable() {
return setIamPolicyCallable;
}
@Override
public UnaryCallable
testIamPermissionsCallable() {
return testIamPermissionsCallable;
}
@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);
}
}