// advertiser filters. See the User class documentation for the names of
// methods for other filters.
user.setAdvertiserUserFilter(filterToAdd);
// Save the changes made and display a success message.
UserSaveResult userSaveResult = userService.saveUser(user);
System.out.printf("User with ID \"%s\" was modified.", userSaveResult.getId());
}
public static void main(String[] args) throws Exception {
// Generate a refreshable OAuth2 credential, which replaces legacy passwords