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

com.google.cloud.securesourcemanager.v1.stub.GrpcSecureSourceManagerStub 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.securesourcemanager.v1.stub;

import static com.google.cloud.securesourcemanager.v1.SecureSourceManagerClient.ListBranchRulesPagedResponse;
import static com.google.cloud.securesourcemanager.v1.SecureSourceManagerClient.ListInstancesPagedResponse;
import static com.google.cloud.securesourcemanager.v1.SecureSourceManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.securesourcemanager.v1.SecureSourceManagerClient.ListRepositoriesPagedResponse;

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.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.securesourcemanager.v1.BranchRule;
import com.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest;
import com.google.cloud.securesourcemanager.v1.CreateInstanceRequest;
import com.google.cloud.securesourcemanager.v1.CreateRepositoryRequest;
import com.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest;
import com.google.cloud.securesourcemanager.v1.DeleteInstanceRequest;
import com.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest;
import com.google.cloud.securesourcemanager.v1.GetBranchRuleRequest;
import com.google.cloud.securesourcemanager.v1.GetInstanceRequest;
import com.google.cloud.securesourcemanager.v1.GetRepositoryRequest;
import com.google.cloud.securesourcemanager.v1.Instance;
import com.google.cloud.securesourcemanager.v1.ListBranchRulesRequest;
import com.google.cloud.securesourcemanager.v1.ListBranchRulesResponse;
import com.google.cloud.securesourcemanager.v1.ListInstancesRequest;
import com.google.cloud.securesourcemanager.v1.ListInstancesResponse;
import com.google.cloud.securesourcemanager.v1.ListRepositoriesRequest;
import com.google.cloud.securesourcemanager.v1.ListRepositoriesResponse;
import com.google.cloud.securesourcemanager.v1.OperationMetadata;
import com.google.cloud.securesourcemanager.v1.Repository;
import com.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest;
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.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 SecureSourceManager service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class GrpcSecureSourceManagerStub extends SecureSourceManagerStub { private static final MethodDescriptor listInstancesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/ListInstances") .setRequestMarshaller( ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getInstanceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.cloud.securesourcemanager.v1.SecureSourceManager/GetInstance") .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) .build(); private static final MethodDescriptor createInstanceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/CreateInstance") .setRequestMarshaller( ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteInstanceMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteInstance") .setRequestMarshaller( ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listRepositoriesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/ListRepositories") .setRequestMarshaller( ProtoUtils.marshaller(ListRepositoriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListRepositoriesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getRepositoryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/GetRepository") .setRequestMarshaller( ProtoUtils.marshaller(GetRepositoryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Repository.getDefaultInstance())) .build(); private static final MethodDescriptor createRepositoryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/CreateRepository") .setRequestMarshaller( ProtoUtils.marshaller(CreateRepositoryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteRepositoryMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteRepository") .setRequestMarshaller( ProtoUtils.marshaller(DeleteRepositoryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor getIamPolicyRepoMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/GetIamPolicyRepo") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor setIamPolicyRepoMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/SetIamPolicyRepo") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor testIamPermissionsRepoMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/TestIamPermissionsRepo") .setRequestMarshaller( ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor createBranchRuleMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/CreateBranchRule") .setRequestMarshaller( ProtoUtils.marshaller(CreateBranchRuleRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor listBranchRulesMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/ListBranchRules") .setRequestMarshaller( ProtoUtils.marshaller(ListBranchRulesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListBranchRulesResponse.getDefaultInstance())) .build(); private static final MethodDescriptor getBranchRuleMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/GetBranchRule") .setRequestMarshaller( ProtoUtils.marshaller(GetBranchRuleRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BranchRule.getDefaultInstance())) .build(); private static final MethodDescriptor updateBranchRuleMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateBranchRule") .setRequestMarshaller( ProtoUtils.marshaller(UpdateBranchRuleRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); private static final MethodDescriptor deleteBranchRuleMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName( "google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteBranchRule") .setRequestMarshaller( ProtoUtils.marshaller(DeleteBranchRuleRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.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 static final MethodDescriptor setIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) .build(); private static final MethodDescriptor testIamPermissionsMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") .setRequestMarshaller( ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) .build(); private final UnaryCallable listInstancesCallable; private final UnaryCallable listInstancesPagedCallable; private final UnaryCallable getInstanceCallable; private final UnaryCallable createInstanceCallable; private final OperationCallable createInstanceOperationCallable; private final UnaryCallable deleteInstanceCallable; private final OperationCallable deleteInstanceOperationCallable; private final UnaryCallable listRepositoriesCallable; private final UnaryCallable listRepositoriesPagedCallable; private final UnaryCallable getRepositoryCallable; private final UnaryCallable createRepositoryCallable; private final OperationCallable createRepositoryOperationCallable; private final UnaryCallable deleteRepositoryCallable; private final OperationCallable deleteRepositoryOperationCallable; private final UnaryCallable getIamPolicyRepoCallable; private final UnaryCallable setIamPolicyRepoCallable; private final UnaryCallable testIamPermissionsRepoCallable; private final UnaryCallable createBranchRuleCallable; private final OperationCallable createBranchRuleOperationCallable; private final UnaryCallable listBranchRulesCallable; private final UnaryCallable listBranchRulesPagedCallable; private final UnaryCallable getBranchRuleCallable; private final UnaryCallable updateBranchRuleCallable; private final OperationCallable updateBranchRuleOperationCallable; private final UnaryCallable deleteBranchRuleCallable; private final OperationCallable deleteBranchRuleOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcSecureSourceManagerStub create(SecureSourceManagerStubSettings settings) throws IOException { return new GrpcSecureSourceManagerStub(settings, ClientContext.create(settings)); } public static final GrpcSecureSourceManagerStub create(ClientContext clientContext) throws IOException { return new GrpcSecureSourceManagerStub( SecureSourceManagerStubSettings.newBuilder().build(), clientContext); } public static final GrpcSecureSourceManagerStub create( ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { return new GrpcSecureSourceManagerStub( SecureSourceManagerStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of GrpcSecureSourceManagerStub, 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 GrpcSecureSourceManagerStub( SecureSourceManagerStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new GrpcSecureSourceManagerCallableFactory()); } /** * Constructs an instance of GrpcSecureSourceManagerStub, 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 GrpcSecureSourceManagerStub( SecureSourceManagerStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings listInstancesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listInstancesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getInstanceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createInstanceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings deleteInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteInstanceMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings listRepositoriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listRepositoriesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getRepositoryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getRepositoryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings createRepositoryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createRepositoryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings deleteRepositoryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteRepositoryMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings getIamPolicyRepoTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyRepoMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings setIamPolicyRepoTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyRepoMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings testIamPermissionsRepoTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsRepoMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); GrpcCallSettings createBranchRuleTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createBranchRuleMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings listBranchRulesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listBranchRulesMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); GrpcCallSettings getBranchRuleTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getBranchRuleMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); GrpcCallSettings updateBranchRuleTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateBranchRuleMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "branch_rule.name", String.valueOf(request.getBranchRule().getName())); return builder.build(); }) .build(); GrpcCallSettings deleteBranchRuleTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteBranchRuleMethodDescriptor) .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(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); 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 testIamPermissionsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); this.listInstancesCallable = callableFactory.createUnaryCallable( listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); this.listInstancesPagedCallable = callableFactory.createPagedCallable( listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); this.getInstanceCallable = callableFactory.createUnaryCallable( getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); this.createInstanceCallable = callableFactory.createUnaryCallable( createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); this.createInstanceOperationCallable = callableFactory.createOperationCallable( createInstanceTransportSettings, settings.createInstanceOperationSettings(), clientContext, operationsStub); this.deleteInstanceCallable = callableFactory.createUnaryCallable( deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); this.deleteInstanceOperationCallable = callableFactory.createOperationCallable( deleteInstanceTransportSettings, settings.deleteInstanceOperationSettings(), clientContext, operationsStub); this.listRepositoriesCallable = callableFactory.createUnaryCallable( listRepositoriesTransportSettings, settings.listRepositoriesSettings(), clientContext); this.listRepositoriesPagedCallable = callableFactory.createPagedCallable( listRepositoriesTransportSettings, settings.listRepositoriesSettings(), clientContext); this.getRepositoryCallable = callableFactory.createUnaryCallable( getRepositoryTransportSettings, settings.getRepositorySettings(), clientContext); this.createRepositoryCallable = callableFactory.createUnaryCallable( createRepositoryTransportSettings, settings.createRepositorySettings(), clientContext); this.createRepositoryOperationCallable = callableFactory.createOperationCallable( createRepositoryTransportSettings, settings.createRepositoryOperationSettings(), clientContext, operationsStub); this.deleteRepositoryCallable = callableFactory.createUnaryCallable( deleteRepositoryTransportSettings, settings.deleteRepositorySettings(), clientContext); this.deleteRepositoryOperationCallable = callableFactory.createOperationCallable( deleteRepositoryTransportSettings, settings.deleteRepositoryOperationSettings(), clientContext, operationsStub); this.getIamPolicyRepoCallable = callableFactory.createUnaryCallable( getIamPolicyRepoTransportSettings, settings.getIamPolicyRepoSettings(), clientContext); this.setIamPolicyRepoCallable = callableFactory.createUnaryCallable( setIamPolicyRepoTransportSettings, settings.setIamPolicyRepoSettings(), clientContext); this.testIamPermissionsRepoCallable = callableFactory.createUnaryCallable( testIamPermissionsRepoTransportSettings, settings.testIamPermissionsRepoSettings(), clientContext); this.createBranchRuleCallable = callableFactory.createUnaryCallable( createBranchRuleTransportSettings, settings.createBranchRuleSettings(), clientContext); this.createBranchRuleOperationCallable = callableFactory.createOperationCallable( createBranchRuleTransportSettings, settings.createBranchRuleOperationSettings(), clientContext, operationsStub); this.listBranchRulesCallable = callableFactory.createUnaryCallable( listBranchRulesTransportSettings, settings.listBranchRulesSettings(), clientContext); this.listBranchRulesPagedCallable = callableFactory.createPagedCallable( listBranchRulesTransportSettings, settings.listBranchRulesSettings(), clientContext); this.getBranchRuleCallable = callableFactory.createUnaryCallable( getBranchRuleTransportSettings, settings.getBranchRuleSettings(), clientContext); this.updateBranchRuleCallable = callableFactory.createUnaryCallable( updateBranchRuleTransportSettings, settings.updateBranchRuleSettings(), clientContext); this.updateBranchRuleOperationCallable = callableFactory.createOperationCallable( updateBranchRuleTransportSettings, settings.updateBranchRuleOperationSettings(), clientContext, operationsStub); this.deleteBranchRuleCallable = callableFactory.createUnaryCallable( deleteBranchRuleTransportSettings, settings.deleteBranchRuleSettings(), clientContext); this.deleteBranchRuleOperationCallable = callableFactory.createOperationCallable( deleteBranchRuleTransportSettings, settings.deleteBranchRuleOperationSettings(), clientContext, operationsStub); 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.setIamPolicyCallable = callableFactory.createUnaryCallable( setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); this.testIamPermissionsCallable = callableFactory.createUnaryCallable( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } public GrpcOperationsStub getOperationsStub() { return operationsStub; } @Override public UnaryCallable listInstancesCallable() { return listInstancesCallable; } @Override public UnaryCallable listInstancesPagedCallable() { return listInstancesPagedCallable; } @Override public UnaryCallable getInstanceCallable() { return getInstanceCallable; } @Override public UnaryCallable createInstanceCallable() { return createInstanceCallable; } @Override public OperationCallable createInstanceOperationCallable() { return createInstanceOperationCallable; } @Override public UnaryCallable deleteInstanceCallable() { return deleteInstanceCallable; } @Override public OperationCallable deleteInstanceOperationCallable() { return deleteInstanceOperationCallable; } @Override public UnaryCallable listRepositoriesCallable() { return listRepositoriesCallable; } @Override public UnaryCallable listRepositoriesPagedCallable() { return listRepositoriesPagedCallable; } @Override public UnaryCallable getRepositoryCallable() { return getRepositoryCallable; } @Override public UnaryCallable createRepositoryCallable() { return createRepositoryCallable; } @Override public OperationCallable createRepositoryOperationCallable() { return createRepositoryOperationCallable; } @Override public UnaryCallable deleteRepositoryCallable() { return deleteRepositoryCallable; } @Override public OperationCallable deleteRepositoryOperationCallable() { return deleteRepositoryOperationCallable; } @Override public UnaryCallable getIamPolicyRepoCallable() { return getIamPolicyRepoCallable; } @Override public UnaryCallable setIamPolicyRepoCallable() { return setIamPolicyRepoCallable; } @Override public UnaryCallable testIamPermissionsRepoCallable() { return testIamPermissionsRepoCallable; } @Override public UnaryCallable createBranchRuleCallable() { return createBranchRuleCallable; } @Override public OperationCallable createBranchRuleOperationCallable() { return createBranchRuleOperationCallable; } @Override public UnaryCallable listBranchRulesCallable() { return listBranchRulesCallable; } @Override public UnaryCallable listBranchRulesPagedCallable() { return listBranchRulesPagedCallable; } @Override public UnaryCallable getBranchRuleCallable() { return getBranchRuleCallable; } @Override public UnaryCallable updateBranchRuleCallable() { return updateBranchRuleCallable; } @Override public OperationCallable updateBranchRuleOperationCallable() { return updateBranchRuleOperationCallable; } @Override public UnaryCallable deleteBranchRuleCallable() { return deleteBranchRuleCallable; } @Override public OperationCallable deleteBranchRuleOperationCallable() { return deleteBranchRuleOperationCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; } @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 - 2025 Weber Informatics LLC | Privacy Policy