private FeedItemSetLinkServiceSettings(FeedItemSetLinkServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); GetFeedItemSetLinkSettings = existing.GetFeedItemSetLinkSettings; MutateFeedItemSetLinksSettings = existing.MutateFeedItemSetLinksSettings; OnCopy(existing); }
/// <summary> /// Constructs a client wrapper for the FeedItemSetLinkService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="FeedItemSetLinkServiceSettings"/> used within this client. /// </param> public FeedItemSetLinkServiceClientImpl(FeedItemSetLinkService.FeedItemSetLinkServiceClient grpcClient, FeedItemSetLinkServiceSettings settings) { GrpcClient = grpcClient; FeedItemSetLinkServiceSettings effectiveSettings = settings ?? FeedItemSetLinkServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetFeedItemSetLink = clientHelper.BuildApiCall <GetFeedItemSetLinkRequest, gagvr::FeedItemSetLink>(grpcClient.GetFeedItemSetLinkAsync, grpcClient.GetFeedItemSetLink, effectiveSettings.GetFeedItemSetLinkSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName); Modify_ApiCall(ref _callGetFeedItemSetLink); Modify_GetFeedItemSetLinkApiCall(ref _callGetFeedItemSetLink); _callMutateFeedItemSetLinks = clientHelper.BuildApiCall <MutateFeedItemSetLinksRequest, MutateFeedItemSetLinksResponse>(grpcClient.MutateFeedItemSetLinksAsync, grpcClient.MutateFeedItemSetLinks, effectiveSettings.MutateFeedItemSetLinksSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateFeedItemSetLinks); Modify_MutateFeedItemSetLinksApiCall(ref _callMutateFeedItemSetLinks); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(FeedItemSetLinkServiceSettings existing);
partial void OnConstruction(FeedItemSetLinkService.FeedItemSetLinkServiceClient grpcClient, FeedItemSetLinkServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="FeedItemSetLinkServiceClient"/> 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="FeedItemSetLinkServiceSettings"/>.</param> /// <returns>The created <see cref="FeedItemSetLinkServiceClient"/>.</returns> internal static FeedItemSetLinkServiceClient Create(grpccore::CallInvoker callInvoker, FeedItemSetLinkServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } FeedItemSetLinkService.FeedItemSetLinkServiceClient grpcClient = new FeedItemSetLinkService.FeedItemSetLinkServiceClient(callInvoker); return(new FeedItemSetLinkServiceClientImpl(grpcClient, settings)); }