/// <summary> /// Constructs a client wrapper for the AdGroupFeedService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="AdGroupFeedServiceSettings"/> used within this client.</param> public AdGroupFeedServiceClientImpl(AdGroupFeedService.AdGroupFeedServiceClient grpcClient, AdGroupFeedServiceSettings settings) { GrpcClient = grpcClient; AdGroupFeedServiceSettings effectiveSettings = settings ?? AdGroupFeedServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetAdGroupFeed = clientHelper.BuildApiCall <GetAdGroupFeedRequest, gagvr::AdGroupFeed>(grpcClient.GetAdGroupFeedAsync, grpcClient.GetAdGroupFeed, effectiveSettings.GetAdGroupFeedSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName); Modify_ApiCall(ref _callGetAdGroupFeed); Modify_GetAdGroupFeedApiCall(ref _callGetAdGroupFeed); _callMutateAdGroupFeeds = clientHelper.BuildApiCall <MutateAdGroupFeedsRequest, MutateAdGroupFeedsResponse>(grpcClient.MutateAdGroupFeedsAsync, grpcClient.MutateAdGroupFeeds, effectiveSettings.MutateAdGroupFeedsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateAdGroupFeeds); Modify_MutateAdGroupFeedsApiCall(ref _callMutateAdGroupFeeds); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
/// <summary> /// Constructs a client wrapper for the AdGroupFeedService service, with the specified gRPC client and settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="AdGroupFeedServiceSettings"/> used within this client </param> public AdGroupFeedServiceClientImpl(AdGroupFeedService.AdGroupFeedServiceClient grpcClient, AdGroupFeedServiceSettings settings) { GrpcClient = grpcClient; AdGroupFeedServiceSettings effectiveSettings = settings ?? AdGroupFeedServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callGetAdGroupFeed = clientHelper.BuildApiCall <GetAdGroupFeedRequest, gagvr::AdGroupFeed>( GrpcClient.GetAdGroupFeedAsync, GrpcClient.GetAdGroupFeed, effectiveSettings.GetAdGroupFeedSettings) .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}")); _callMutateAdGroupFeeds = clientHelper.BuildApiCall <MutateAdGroupFeedsRequest, MutateAdGroupFeedsResponse>( GrpcClient.MutateAdGroupFeedsAsync, GrpcClient.MutateAdGroupFeeds, effectiveSettings.MutateAdGroupFeedsSettings) .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}")); Modify_ApiCall(ref _callGetAdGroupFeed); Modify_GetAdGroupFeedApiCall(ref _callGetAdGroupFeed); Modify_ApiCall(ref _callMutateAdGroupFeeds); Modify_MutateAdGroupFeedsApiCall(ref _callMutateAdGroupFeeds); OnConstruction(grpcClient, effectiveSettings, clientHelper); }