/// <summary>
 /// Creates a <see cref="WebRiskServiceV1Beta1Client"/> 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="WebRiskServiceV1Beta1Settings"/>.</param>
 /// <returns>The created <see cref="WebRiskServiceV1Beta1Client"/>.</returns>
 public static WebRiskServiceV1Beta1Client Create(grpccore::CallInvoker callInvoker, WebRiskServiceV1Beta1Settings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     WebRiskServiceV1Beta1.WebRiskServiceV1Beta1Client grpcClient = new WebRiskServiceV1Beta1.WebRiskServiceV1Beta1Client(callInvoker);
     return(new WebRiskServiceV1Beta1ClientImpl(grpcClient, settings));
 }
Example #2
0
        /// <summary>
        /// Constructs a client wrapper for the WebRiskServiceV1Beta1 service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="WebRiskServiceV1Beta1Settings"/> used within this client.</param>
        public WebRiskServiceV1Beta1ClientImpl(WebRiskServiceV1Beta1.WebRiskServiceV1Beta1Client grpcClient, WebRiskServiceV1Beta1Settings settings)
        {
            GrpcClient = grpcClient;
            WebRiskServiceV1Beta1Settings effectiveSettings = settings ?? WebRiskServiceV1Beta1Settings.GetDefault();
            gaxgrpc::ClientHelper         clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callComputeThreatListDiff = clientHelper.BuildApiCall <ComputeThreatListDiffRequest, ComputeThreatListDiffResponse>(grpcClient.ComputeThreatListDiffAsync, grpcClient.ComputeThreatListDiff, effectiveSettings.ComputeThreatListDiffSettings);
            Modify_ApiCall(ref _callComputeThreatListDiff);
            Modify_ComputeThreatListDiffApiCall(ref _callComputeThreatListDiff);
            _callSearchUris = clientHelper.BuildApiCall <SearchUrisRequest, SearchUrisResponse>(grpcClient.SearchUrisAsync, grpcClient.SearchUris, effectiveSettings.SearchUrisSettings);
            Modify_ApiCall(ref _callSearchUris);
            Modify_SearchUrisApiCall(ref _callSearchUris);
            _callSearchHashes = clientHelper.BuildApiCall <SearchHashesRequest, SearchHashesResponse>(grpcClient.SearchHashesAsync, grpcClient.SearchHashes, effectiveSettings.SearchHashesSettings);
            Modify_ApiCall(ref _callSearchHashes);
            Modify_SearchHashesApiCall(ref _callSearchHashes);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Example #3
0
 partial void OnConstruction(WebRiskServiceV1Beta1.WebRiskServiceV1Beta1Client grpcClient, WebRiskServiceV1Beta1Settings effectiveSettings, gaxgrpc::ClientHelper clientHelper);