/// <summary> /// Constructs a client wrapper for the ConversionValueRuleService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="ConversionValueRuleServiceSettings"/> used within this client. /// </param> public ConversionValueRuleServiceClientImpl(ConversionValueRuleService.ConversionValueRuleServiceClient grpcClient, ConversionValueRuleServiceSettings settings) { GrpcClient = grpcClient; ConversionValueRuleServiceSettings effectiveSettings = settings ?? ConversionValueRuleServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callMutateConversionValueRules = clientHelper.BuildApiCall <MutateConversionValueRulesRequest, MutateConversionValueRulesResponse>(grpcClient.MutateConversionValueRulesAsync, grpcClient.MutateConversionValueRules, effectiveSettings.MutateConversionValueRulesSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateConversionValueRules); Modify_MutateConversionValueRulesApiCall(ref _callMutateConversionValueRules); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
/// <summary> /// Creates a <see cref="ConversionValueRuleServiceClient"/> 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="ConversionValueRuleServiceSettings"/>.</param> /// <returns>The created <see cref="ConversionValueRuleServiceClient"/>.</returns> internal static ConversionValueRuleServiceClient Create(grpccore::CallInvoker callInvoker, ConversionValueRuleServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } ConversionValueRuleService.ConversionValueRuleServiceClient grpcClient = new ConversionValueRuleService.ConversionValueRuleServiceClient(callInvoker); return(new ConversionValueRuleServiceClientImpl(grpcClient, settings)); }
partial void OnConstruction(ConversionValueRuleService.ConversionValueRuleServiceClient grpcClient, ConversionValueRuleServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);