if (operations.length > 0) {
// Disable validateOnly so we can submit the AdGroupAds with exemptions.
session.setValidateOnly(false);
// Add ads with exemptions.
AdGroupAdReturnValue result = adGroupAdService.mutate(operations);
// Display ads.
if (result != null && result.getValue() != null) {
for (AdGroupAd adGroupAdResult : result.getValue()) {
System.out.printf("Ad with id \"%s\" and headline \"%s\" was added.\n", adGroupAdResult