runExample(adWordsServices, session, feedId, feedItemDescriptions);
}
public static void runExample(AdWordsServices adWordsServices, AdWordsSession session,
Long feedId, Map<Long, String[]> feedItemDescriptions) throws Exception {
FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class);
Selector selector = new Selector();
// Do not include "Attributes" because you do not want to pass existing
// attributes into the subsequent mutate (SET) call.
selector.setFields(new String[] {"Id", "Attributes"});
selector.setPredicates(new Predicate[] {
new Predicate("Id", PredicateOperator.EQUALS, new String[] {feedId.toString()})});
Feed feed = feedService.get(selector).getEntries()[0];
// Add new attributes to the feed.
FeedAttribute[] newAttributes = addLine1And2FeedAttributes(adWordsServices, session, feed);
FeedAttribute line1Attribute = newAttributes[0];
FeedAttribute line2Attribute = newAttributes[1];