Predicate campaignIdPredicate =
new Predicate("CampaignId", PredicateOperator.IN, new String[] {campaignId.toString()});
selector.setPredicates(new Predicate[] {campaignIdPredicate});
// Get all ad groups.
AdGroupPage page = adGroupService.get(selector);
// Display ad groups.
if (page.getEntries() != null) {
for (AdGroup adGroup : page.getEntries()) {
System.out.println("Ad group with name \"" + adGroup.getName()
+ "\" and id \"" + adGroup.getId() + "\" was found.");
}
} else {
System.out.println("No ad groups were found.");