Package com.google.api.adwords.v201008.cm

Examples of com.google.api.adwords.v201008.cm.AdExtensionOverrideServiceInterface


  }

  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 \""
View Full Code Here


  /**
   * Test updating an ad group ad.
   */
  public void testUpdate() throws Exception {
    // Create ad with updated status.
    Ad ad = new Ad();
    ad.setId(adId);

    // Create ad with updated status
    AdGroupAd adGroupAd = new AdGroupAd();
    adGroupAd.setAdGroupId(adGroupId);
    adGroupAd.setAd(ad);
View Full Code Here

  /**
   * Test removing an ad group ad.
   */
  public void testRemove() throws Exception {
    // Create ad with updated status.
    Ad ad = new Ad();
    ad.setId(adId);

    // Create ad with updated status
    AdGroupAd adGroupAd = new AdGroupAd();
    adGroupAd.setAdGroupId(adGroupId);
    adGroupAd.setAd(ad);
View Full Code Here

   */
  public void testRemove() throws Exception {
    // Create campaign ad extension
    CampaignAdExtension extension = new CampaignAdExtension();
    extension.setCampaignId(campaignId);
    extension.setAdExtension(new AdExtension(adExtensionId, null));

    // Create operations.
    CampaignAdExtensionOperation operation = new CampaignAdExtensionOperation();
    operation.setOperand(extension);
    operation.setOperator(Operator.REMOVE);
View Full Code Here

    // 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);

    // Create operations.
    AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
    operation.setOperand(adExtensionOverride);
View Full Code Here

    // 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);

    // Create operations.
    AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
    operation.setOperand(adExtensionOverride);
View Full Code Here

    // Get the AdExtensionOverrideService.
    AdExtensionOverrideServiceInterface adExtensionOverrideService =
        user.getService(AdWordsService.V201008.AD_EXTENSION_OVERRIDE_SERVICE);

    // 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);

    // Create operations.
    AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
    operation.setOperand(adExtensionOverride);
    operation.setOperator(Operator.ADD);
View Full Code Here

    // Get the AdExtensionOverrideService.
    AdExtensionOverrideServiceInterface adExtensionOverrideService =
        user.getService(AdWordsService.V201008.AD_EXTENSION_OVERRIDE_SERVICE);

    // 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);

    // Create operations.
    AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
    operation.setOperand(adExtensionOverride);
    operation.setOperator(Operator.REMOVE);
View Full Code Here

    AdExtension adExtension = new AdExtension();
    adExtension.setId(campaignAdExtensionId);
    adExtensionOverride.setAdExtension(adExtension);

    // 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);
View Full Code Here

    AdExtension adExtension = new AdExtension();
    adExtension.setId(campaignAdExtensionId);
    adExtensionOverride.setAdExtension(adExtension);

    // Create operations.
    AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
    operation.setOperand(adExtensionOverride);
    operation.setOperator(Operator.REMOVE);

    AdExtensionOverrideOperation[] operations = new AdExtensionOverrideOperation[] {operation};

    // Add ad extension override.
    AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201008.cm.AdExtensionOverrideServiceInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.