Package com.google.api.adwords.v201306.cm

Examples of com.google.api.adwords.v201306.cm.NegativeCampaignCriterion


      campaignTargetService.mutate(new CampaignTargetOperation[] {new CampaignTargetOperation(
          Operator.SET, null, new NetworkTargetList(campaign.getId(), null,
              new NetworkTarget[] {new NetworkTarget(null, NetworkCoverageType.GOOGLE_SEARCH)}))});

      NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
      negativeCampaignCriterion.setCampaignId(campaign.getId());
      negativeCampaignCriterion.setCriterion(new Placement(null, null, "http://example.com/"));

      CampaignCriterionOperation operation = new CampaignCriterionOperation();
      operation.setOperator(Operator.ADD);
      operation.setOperand(negativeCampaignCriterion);
View Full Code Here


    Keyword keyword = new Keyword();
    keyword.setText("jupiter cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create negative campaign criterion.
    NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
    negativeCampaignCriterion.setCampaignId(campaignId);
    negativeCampaignCriterion.setCriterion(keyword);

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

    Keyword keyword = new Keyword();
    keyword.setText("mars cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create negative campaign criterion.
    NegativeCampaignCriterion criterion = new NegativeCampaignCriterion();
    criterion.setCampaignId(campaignId);
    criterion.setCriterion(keyword);

    // Create operations.
    CampaignCriterionOperation operation = new CampaignCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.ADD);

    // Add campaign criteria.
    CampaignCriterionReturnValue result = service
        .mutate(new CampaignCriterionOperation[] {operation});
    NegativeCampaignCriterion testCriterion = (NegativeCampaignCriterion) result.getValue()[0];

    // Exclude generated fields.
    criterion.getCriterion().setId(testCriterion.getCriterion().getId());
    criterion.getCriterion().setCriterionType(testCriterion.getCriterion().getCriterionType());
    criterion.setCampaignCriterionType(testCriterion.getCampaignCriterionType());

    TestUtils.assertDeepReflectionEquals(criterion, testCriterion);
  }
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

      long adId = Long.parseLong("INSERT_AD_ID_HERE");
      long campaignAdExtensionId = Long.parseLong("INSERT_CAMPAIGN_AD_EXTENSION_ID_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);
      operation.setOperator(Operator.ADD);
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

      operation.setOperator(Operator.ADD);

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

      // Add ad extension override.
      AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);

      // Display ad extension overrides.
      if (result != null && result.getValue() != null) {
        for (AdExtensionOverride adExtensionOverrideResult : result.getValue()) {
          System.out.println("Ad extension override with ad id \""
              + adExtensionOverrideResult.getAdId() + "\" and ad extension id \""
              + adExtensionOverrideResult.getAdExtension().getId() + "\" was added.");
        }
      } else {
View Full Code Here

      // Get AdWordsUser from "~/adwords.properties".
      AdWordsUser user = new AdWordsUser();

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

      long adId = Long.parseLong("INSERT_AD_ID_HERE");
      long campaignAdExtensionId = Long.parseLong("INSERT_CAMPAIGN_AD_EXTENSION_ID_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);
      operation.setOperator(Operator.ADD);

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

      // Add ad extension override.
      AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);

      // Display ad extension overrides.
      if (result != null && result.getValue() != null) {
        for (AdExtensionOverride adExtensionOverrideResult : result.getValue()) {
          System.out.println("Ad extension override with ad id \""
View Full Code Here

          user.getService(AdWordsService.V201306.ADGROUP_SERVICE);

      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

      // Create ad group with DELETED status.
      AdGroup adGroup = new AdGroup();
      adGroup.setId(adGroupId);
      adGroup.setStatus(AdGroupStatus.DELETED);

      // Create operations.
      AdGroupOperation operation = new AdGroupOperation();
      operation.setOperand(adGroup);
      operation.setOperator(Operator.SET);
View Full Code Here

          user.getService(AdWordsService.V201306.ADGROUP_SERVICE);

      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

      // Create ad group with updated status.
      AdGroup adGroup = new AdGroup();
      adGroup.setId(adGroupId);
      adGroup.setStatus(AdGroupStatus.PAUSED);

      // Create operations.
      AdGroupOperation operation = new AdGroupOperation();
      operation.setOperand(adGroup);
      operation.setOperator(Operator.SET);
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201306.cm.NegativeCampaignCriterion

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.