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

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


          BiddableAdGroupCriterion criterion = new BiddableAdGroupCriterion();
          criterion.setAdGroupId(adGroup.getId());
          criterion.setCriterion(keyword);

          criteriaOps.add(new AdGroupCriterionOperation(Operator.ADD, "ADD", criterion, null));
        }

        adGrouCriterionService.mutate(criteriaOps.toArray(new AdGroupCriterionOperation[] {}));
      }
    }
View Full Code Here


    BiddableAdGroupCriterion placementBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    placementBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    placementBiddableAdGroupCriterion.setCriterion(placement);

    // Create operations.
    AdGroupCriterionOperation keywordAdGroupCriterionOperation = new AdGroupCriterionOperation();
    keywordAdGroupCriterionOperation.setOperand(keywordBiddableAdGroupCriterion);
    keywordAdGroupCriterionOperation.setOperator(Operator.ADD);

    AdGroupCriterionOperation placementAdGroupCriterionOperation = new AdGroupCriterionOperation();
    placementAdGroupCriterionOperation.setOperand(placementBiddableAdGroupCriterion);
    placementAdGroupCriterionOperation.setOperator(Operator.ADD);

    AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {
        keywordAdGroupCriterionOperation, placementAdGroupCriterionOperation};

    // Add ad group criteria and return Criterion ID.
View Full Code Here

    ManualCPCAdGroupCriterionBids bids = new ManualCPCAdGroupCriterionBids();
    bids.setMaxCpc(new Bid(new Money(null, 10000L)));
    criterion.setBids(bids);

    // Create operations.
    AdGroupCriterionOperation keywordAdGroupCriterionOperation = new AdGroupCriterionOperation();
    keywordAdGroupCriterionOperation.setOperand(criterion);
    keywordAdGroupCriterionOperation.setOperator(Operator.ADD);

    AdGroupCriterionOperation[] operations =
        new AdGroupCriterionOperation[] {keywordAdGroupCriterionOperation};

    // Add ad group criteria.
View Full Code Here

    NegativeAdGroupCriterion criterion = new NegativeAdGroupCriterion();
    criterion.setAdGroupId(adGroupId);
    criterion.setCriterion(keyword);

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

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

    // Add ad group criteria.
    AdGroupCriterionReturnValue result = service.mutate(operations);
View Full Code Here

    criterion.setAdGroupId(adGroupId);
    criterion.setCriterion(new Criterion(criterionId, null));
    criterion.setUserStatus(UserStatus.PAUSED);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.SET);

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

    // Update ad group criteria.
    AdGroupCriterionReturnValue result = service.mutate(operations);
View Full Code Here

    BiddableAdGroupCriterion criterion = new BiddableAdGroupCriterion();
    criterion.setAdGroupId(adGroupId);
    criterion.setCriterion(new Criterion(criterionId, null));

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(criterion);
    operation.setOperator(Operator.SET);

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

    // Update ad group criteria.
    AdGroupCriterionReturnValue result = service.mutate(operations);
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

      Predicate adGroupIdPredicate =
          new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
      selector.setPredicates(new Predicate[] {adGroupIdPredicate});

      // Get bid landscape for ad group criteria.
      AdGroupBidLandscapePage page = dataService.getAdGroupBidLandscape(selector);

      // Display bid landscapes.
      if (page.getEntries() != null) {
        for (AdGroupBidLandscape adGroupBidLandscape : page.getEntries()) {
          System.out.println("Ad group bid landscape with ad group id \""
              + adGroupBidLandscape.getAdGroupId() + "\", type \""
              + adGroupBidLandscape.getType() + "\", current \""
              + adGroupBidLandscape.getLandscapeCurrent() + "\", start date \""
              + adGroupBidLandscape.getStartDate() + "\", end date \""
View Full Code Here

        // Create BiddableAdGroupCriterion.
        BiddableAdGroupCriterion bagc = new BiddableAdGroupCriterion();
        bagc.setAdGroupId(adGroupId);
        bagc.setCriterion(keyword);
        // Create AdGroupCriterionOperation.
        AdGroupCriterionOperation agco = new AdGroupCriterionOperation();
        agco.setOperand(bagc);
        agco.setOperator(Operator.ADD);
        // Add to list.
        operations.add(agco);
      }

      // You can specify up to 3 job IDs that must successfully complete before
View Full Code Here

TOP

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

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.