code: private static FeedItemOperation createFeedItemAddOperation(
        String name, String price, String date, AdCustomizerFeed adCustomizerFeed) {
      FeedItem feedItem = new FeedItem();
      feedItem.setFeedId(adCustomizerFeed.getFeedId());
  
      List<FeedItemAttributeValue> attributeValues = new ArrayList<>();
  
      // FeedAttributes appear in the same order as they were created - Name, Price, Date.
      // See the createCustomizerFeed method for details.
      FeedItemAttributeValue nameAttributeValue = new FeedItemAttributeValue();
      nameAttributeValue.setFeedAttributeId(adCustomizerFeed.getFeedAttributes(0).getId());
      nameAttributeValue.setStringValue(name);
      attributeValues.add(nameAttributeValue);
  
      FeedItemAttributeValue priceAttributeValue = new FeedItemAttributeValue();
      priceAttributeValue.setFeedAttributeId(adCustomizerFeed.getFeedAttributes(1).getId());
      priceAttributeValue.setStringValue(price);
      attributeValues.add(priceAttributeValue);
  
      FeedItemAttributeValue dateAttributeValue = new FeedItemAttributeValue();
      dateAttributeValue.setFeedAttributeId(adCustomizerFeed.getFeedAttributes(2).getId());
      dateAttributeValue.setStringValue(date);
      attributeValues.add(dateAttributeValue);
  
      feedItem.setAttributeValues(
          attributeValues.toArray(new FeedItemAttributeValue[attributeValues.size()]));
  
      FeedItemOperation feedItemOperation = new FeedItemOperation();
      feedItemOperation.setOperand(feedItem);
      feedItemOperation.setOperator(Operator.ADD);
  
      return feedItemOperation;
    }
docs: Creates a FeedItemOperation that will create a FeedItem with the specified values and ad group
  target when sent to FeedItemService.mutate.
  
  @param name the value for the name attribute of the FeedItem
  @param price the value for the price attribute of the FeedItem
  @param date the value for the date attribute of the FeedItem
  @param adCustomizerFeed the customizer feed
  @return a new FeedItemOperation for adding a FeedItem