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

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


    adGroup.setStatus(AdGroupStatus.ENABLED);
    adGroup.setCampaignId(campaignId);

    // Create ad group bid.
    ManualCPCAdGroupBids adGroupBids = new ManualCPCAdGroupBids();
    adGroupBids.setKeywordMaxCpc(new Bid(new Money(null, 10000000L)));
    adGroup.setBids(adGroupBids);

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


    campaign.setBiddingStrategy(new ManualCPC());

    // Create budget.
    Budget budget = new Budget();
    budget.setPeriod(BudgetBudgetPeriod.DAILY);
    budget.setAmount(new Money(null, 50000000L));
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    campaign.setBudget(budget);

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
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

    BiddableAdGroupCriterion keywordBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    keywordBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    keywordBiddableAdGroupCriterion.setCriterion(keyword);

    // Create placement.
    Placement placement = new Placement();
    placement.setUrl("http://mars.google.com");

    // Create biddable ad group criterion for placement.
    BiddableAdGroupCriterion placementBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    placementBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    placementBiddableAdGroupCriterion.setCriterion(placement);
View Full Code Here

    // Get the AdGroupAdService.
    AdGroupAdServiceInterface adGroupAdService =
        user.getService(AdWordsService.V201008.ADGROUP_AD_SERVICE);

    // Create text ad.
    TextAd textAd = new TextAd();
    textAd.setHeadline("Luxury Cruise to Mars");
    textAd.setDescription1("Visit the Red Planet in style.");
    textAd.setDescription2("Low-gravity fun for everyone!");
    textAd.setDisplayUrl("www.example.com");
    textAd.setUrl("http://www.example.com");

    // Create ad group ad.
    AdGroupAd textAdGroupAd = new AdGroupAd();
    textAdGroupAd.setAdGroupId(adGroupId);
    textAdGroupAd.setAd(textAd);
View Full Code Here

  /**
   * Test adding an ad group ad.
   */
  public void testAdd() throws Exception {
    // Create text ad.
    TextAd textAd = new TextAd();
    textAd.setHeadline("Luxury Cruise to Mars");
    textAd.setDescription1("Visit the Red Planet in style.");
    textAd.setDescription2("Low-gravity fun for everyone!");
    textAd.setDisplayUrl("www.example.com");
    textAd.setUrl("http://www.example.com");

    // Create ad group ad.
    AdGroupAd ad = new AdGroupAd();
    ad.setAdGroupId(adGroupId);
    ad.setAd(textAd);
View Full Code Here

    selector.setMethodName("mutate");
    selector.setOperator(Operator.ADD);
    selector.setDateRange(new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today()));
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here

  public void testGetMonthlyLimits() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here

    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        new String[] {clientId}, ApiUsageType.UNIT_COUNT_FOR_CLIENTS);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNotNull(apiUsageInfo.getApiUsageRecords());
    assertEquals(clientId, apiUsageInfo.getApiUsageRecords()[0].getClientEmail());
    assertNotNull(apiUsageInfo.getApiUsageRecords()[0].getCost());
  }
View Full Code Here

    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        null, ApiUsageType.METHOD_COST);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here

TOP

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

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.