code: private static void restrictFeedItemToAdGroup(
        AdWordsServicesInterface adWordsServices,
        AdWordsSession session,
        SiteLinksDataHolder siteLinksData,
        Long adGroupId)
        throws RemoteException {
      FeedItemTargetServiceInterface feedItemTargetService =
          adWordsServices.get(session, FeedItemTargetServiceInterface.class);
      FeedItemAdGroupTarget feedItemAdGroupTarget = new FeedItemAdGroupTarget();
      feedItemAdGroupTarget.setAdGroupId(adGroupId);
      feedItemAdGroupTarget.setFeedId(siteLinksData.siteLinksFeedId);
      feedItemAdGroupTarget.setFeedItemId(siteLinksData.siteLinkFeedItemIds.get(0));
  
      FeedItemTargetOperation operation = new FeedItemTargetOperation();
      operation.setOperand(feedItemAdGroupTarget);
      operation.setOperator(Operator.ADD);
  
      feedItemAdGroupTarget =
          (FeedItemAdGroupTarget)
              feedItemTargetService.mutate(new FeedItemTargetOperation[] {operation}).getValue(0);
      System.out.printf(
          "Feed item target for feed ID %d and feed item ID %d was created to restrict serving to "
              + "ad group ID %d'.%n",
          feedItemAdGroupTarget.getFeedId(),
          feedItemAdGroupTarget.getFeedItemId(),
          feedItemAdGroupTarget.getAdGroupId());
    }
docs: Restricts the first feed item in {@code siteLinksData} to only serve with ads for the specified
  ad group ID.