示例#1
0
        /// <summary>
        /// Constructs a client wrapper for the FeedItemTargetService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="FeedItemTargetServiceSettings"/> used within this client.</param>
        public FeedItemTargetServiceClientImpl(FeedItemTargetService.FeedItemTargetServiceClient grpcClient, FeedItemTargetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FeedItemTargetServiceSettings effectiveSettings = settings ?? FeedItemTargetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper         clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetFeedItemTarget = clientHelper.BuildApiCall <GetFeedItemTargetRequest, gagvr::FeedItemTarget>(grpcClient.GetFeedItemTargetAsync, grpcClient.GetFeedItemTarget, effectiveSettings.GetFeedItemTargetSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetFeedItemTarget);
            Modify_GetFeedItemTargetApiCall(ref _callGetFeedItemTarget);
            _callMutateFeedItemTargets = clientHelper.BuildApiCall <MutateFeedItemTargetsRequest, MutateFeedItemTargetsResponse>(grpcClient.MutateFeedItemTargetsAsync, grpcClient.MutateFeedItemTargets, effectiveSettings.MutateFeedItemTargetsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateFeedItemTargets);
            Modify_MutateFeedItemTargetsApiCall(ref _callMutateFeedItemTargets);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
示例#2
0
        /// <summary>
        /// Constructs a client wrapper for the FeedItemTargetService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="FeedItemTargetServiceSettings"/> used within this client </param>
        public FeedItemTargetServiceClientImpl(FeedItemTargetService.FeedItemTargetServiceClient grpcClient, FeedItemTargetServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FeedItemTargetServiceSettings effectiveSettings = settings ?? FeedItemTargetServiceSettings.GetDefault();
            gaxgrpc::ClientHelper         clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetFeedItemTarget = clientHelper.BuildApiCall <GetFeedItemTargetRequest, gagvr::FeedItemTarget>(
                GrpcClient.GetFeedItemTargetAsync, GrpcClient.GetFeedItemTarget, effectiveSettings.GetFeedItemTargetSettings)
                                     .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            _callMutateFeedItemTargets = clientHelper.BuildApiCall <MutateFeedItemTargetsRequest, MutateFeedItemTargetsResponse>(
                GrpcClient.MutateFeedItemTargetsAsync, GrpcClient.MutateFeedItemTargets, effectiveSettings.MutateFeedItemTargetsSettings)
                                         .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callGetFeedItemTarget);
            Modify_GetFeedItemTargetApiCall(ref _callGetFeedItemTarget);
            Modify_ApiCall(ref _callMutateFeedItemTargets);
            Modify_MutateFeedItemTargetsApiCall(ref _callMutateFeedItemTargets);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }