def CreateFeedItemAddOperation(name, price, date, ad_customizer_feed):
  """Creates a FeedItemOperation.

  The generated FeedItemOperation will create a FeedItem with the specified
  values when sent to FeedItemService.mutate.

  Args:
    name: the value for the name attribute of the FeedItem.
    price: the value for the price attribute of the FeedItem.
    date: the value for the date attribute of the FeedItem.
    ad_customizer_feed: the AdCustomizerFeed we're associating the FeedItems
        with.

  Returns:
    A new FeedItemOperation for adding a FeedItem.
  """
  feed_item = {
      'feedId': ad_customizer_feed['feedId'],
      'attributeValues': [
          {
              'feedAttributeId': ad_customizer_feed['feedAttributes'][0]['id'],
              'stringValue': name
          },
          {
              'feedAttributeId': ad_customizer_feed['feedAttributes'][1]['id'],
              'stringValue': price
          },
          {
              'feedAttributeId': ad_customizer_feed['feedAttributes'][2]['id'],
              'stringValue': date
          }
      ]
  }

  operation = {
      'operator': 'ADD',
      'operand': feed_item
  }

  return operation
Creates a FeedItemOperation.

  The generated FeedItemOperation will create a FeedItem with the specified
  values when sent to FeedItemService.mutate.

  Args:
    name: the value for the name attribute of the FeedItem.
    price: the value for the price attribute of the FeedItem.
    date: the value for the date attribute of the FeedItem.
    ad_customizer_feed: the AdCustomizerFeed we're associating the FeedItems
        with.

  Returns:
    A new FeedItemOperation for adding a FeedItem.