/// <summary> /// Constructs a client wrapper for the IamChecker service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="IamCheckerSettings"/> used within this client.</param> public IamCheckerClientImpl(IamChecker.IamCheckerClient grpcClient, IamCheckerSettings settings) { GrpcClient = grpcClient; IamCheckerSettings effectiveSettings = settings ?? IamCheckerSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callTroubleshootIamPolicy = clientHelper.BuildApiCall <TroubleshootIamPolicyRequest, TroubleshootIamPolicyResponse>(grpcClient.TroubleshootIamPolicyAsync, grpcClient.TroubleshootIamPolicy, effectiveSettings.TroubleshootIamPolicySettings); Modify_ApiCall(ref _callTroubleshootIamPolicy); Modify_TroubleshootIamPolicyApiCall(ref _callTroubleshootIamPolicy); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
/// <summary> /// Creates a <see cref="IamCheckerClient"/> which uses the specified call invoker for remote operations. /// </summary> /// <param name="callInvoker"> /// The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null. /// </param> /// <param name="settings">Optional <see cref="IamCheckerSettings"/>.</param> /// <returns>The created <see cref="IamCheckerClient"/>.</returns> internal static IamCheckerClient Create(grpccore::CallInvoker callInvoker, IamCheckerSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } IamChecker.IamCheckerClient grpcClient = new IamChecker.IamCheckerClient(callInvoker); return(new IamCheckerClientImpl(grpcClient, settings)); }
partial void OnConstruction(IamChecker.IamCheckerClient grpcClient, IamCheckerSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);