}
public static void runExample(AdWordsServices adWordsServices, AdWordsSession session, Long adId,
Long campaignAdExtensionId) throws Exception {
// Get the AdExtensionOverrideService.
AdExtensionOverrideServiceInterface adExtensionOverrideService =
adWordsServices.get(session, AdExtensionOverrideServiceInterface.class);
// Create ad extension override.
AdExtensionOverride adExtensionOverride = new AdExtensionOverride();
adExtensionOverride.setAdId(adId);
// Create ad extension using existing id.
AdExtension adExtension = new AdExtension();
adExtension.setId(campaignAdExtensionId);
adExtensionOverride.setAdExtension(adExtension);
adExtensionOverride.setOverrideInfo(new OverrideInfo(new LocationOverrideInfo(5,
LocationOverrideInfoRadiusUnits.MILES)));
// Create operations.
AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
operation.setOperand(adExtensionOverride);
operation.setOperator(Operator.ADD);
AdExtensionOverrideOperation[] operations = new AdExtensionOverrideOperation[] {operation};
// Add ad extension override.
AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);
// Display ad extension overrides.
for (AdExtensionOverride adExtensionOverrideResult : result.getValue()) {
System.out.println("Location ad extension override with ad id \""
+ adExtensionOverrideResult.getAdId() + "\" and ad extension id \""