/// <summary> /// Constructs a client wrapper for the RecommendationService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="RecommendationServiceSettings"/> used within this client.</param> public RecommendationServiceClientImpl(RecommendationService.RecommendationServiceClient grpcClient, RecommendationServiceSettings settings) { GrpcClient = grpcClient; RecommendationServiceSettings effectiveSettings = settings ?? RecommendationServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetRecommendation = clientHelper.BuildApiCall <GetRecommendationRequest, gagvr::Recommendation>(grpcClient.GetRecommendationAsync, grpcClient.GetRecommendation, effectiveSettings.GetRecommendationSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName); Modify_ApiCall(ref _callGetRecommendation); Modify_GetRecommendationApiCall(ref _callGetRecommendation); _callApplyRecommendation = clientHelper.BuildApiCall <ApplyRecommendationRequest, ApplyRecommendationResponse>(grpcClient.ApplyRecommendationAsync, grpcClient.ApplyRecommendation, effectiveSettings.ApplyRecommendationSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callApplyRecommendation); Modify_ApplyRecommendationApiCall(ref _callApplyRecommendation); _callDismissRecommendation = clientHelper.BuildApiCall <DismissRecommendationRequest, DismissRecommendationResponse>(grpcClient.DismissRecommendationAsync, grpcClient.DismissRecommendation, effectiveSettings.DismissRecommendationSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callDismissRecommendation); Modify_DismissRecommendationApiCall(ref _callDismissRecommendation); OnConstruction(grpcClient, effectiveSettings, clientHelper); }