Package com.google.api.ads.adwords.axis.v201402.cm

Examples of com.google.api.ads.adwords.axis.v201402.cm.Budget


    Random generator = new Random();

    int numCamp = generator.nextInt(4) + 1;
    for (int i = 0; i < numCamp; i++) {
      Campaign campaign = new Campaign();
      campaign.setBudget(new Budget(BudgetBudgetPeriod.DAILY, new Money("USD", 1000000L),
          BudgetBudgetDeliveryMethod.STANDARD));
      campaign.setStatus(CampaignStatus.PAUSED);
      campaign.setBiddingStrategy(new ManualCPC());
      CampaignReturnValue crv =
          campaignService.mutate(new CampaignOperation[] {new CampaignOperation(Operator.ADD, null,
View Full Code Here


    campaign.setName("Test Campaign " + System.currentTimeMillis());
    campaign.setStatus(CampaignStatus.PAUSED);
    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();
    operation.setOperand(campaign);
View Full Code Here

    campaign.setName("Test Campaign #" + System.currentTimeMillis());
    campaign.setBiddingStrategy(new ManualCPC());
    campaign.setStatus(CampaignStatus.PAUSED);

    // 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();
    operation.setOperand(campaign);
View Full Code Here

    campaign.setName("Campaign #" + System.currentTimeMillis());
    campaign.setStatus(CampaignStatus.PAUSED);
    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();
    operation.setOperand(campaign);
View Full Code Here

    campaign2.setName("Campaign #" + (System.currentTimeMillis() + 1L));
    campaign2.setStatus(CampaignStatus.PAUSED);
    campaign2.setBiddingStrategy(new ManualCPC());

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

    // Create operations.
    CampaignOperation operation1 = new CampaignOperation();
View Full Code Here

    Campaign campaign = new Campaign();
    campaign.setId(campaign1.getId());
    campaign.setStatus(CampaignStatus.ACTIVE);

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

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
    operation.setOperand(campaign);
    operation.setOperator(Operator.SET);

    CampaignOperation[] operations = new CampaignOperation[] {operation};
    CampaignReturnValue result = campaignService.mutate(operations);
    Campaign testCampaign = result.getValue()[0];

    // Set the updated fields.
    campaign1.setStatus(CampaignStatus.ACTIVE);
    budget.getAmount().setComparableValueType(
        testCampaign.getBudget().getAmount().getComparableValueType());
    campaign1.setBudget(budget);

    // Set the generated fields.
    campaign1.setCampaignStats(testCampaign.getCampaignStats());
View Full Code Here

    Campaign campaign2 = new Campaign();
    campaign2.setId(this.campaign2.getId());
    campaign2.setStatus(CampaignStatus.DELETED);

    // Create and set budget.
    Budget budget = new Budget();
    budget.setPeriod(BudgetBudgetPeriod.DAILY);
    budget.setAmount(new Money(null, 3000000L));
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    campaign1.setBudget(budget);
    campaign2.setBudget(budget);

    // Create operations.
    CampaignOperation operation1 = new CampaignOperation();
    operation1.setOperand(campaign1);
    operation1.setOperator(Operator.SET);

    CampaignOperation operation2 = new CampaignOperation();
    operation2.setOperand(campaign2);
    operation2.setOperator(Operator.SET);

    CampaignOperation[] operations = new CampaignOperation[] {operation1, operation2};
    CampaignReturnValue result = campaignService.mutate(operations);
    Campaign testCampaign1 = result.getValue()[0];
    Campaign testCampaign2 = result.getValue()[1];

    // Set the updated fields.
    this.campaign1.setStatus(CampaignStatus.DELETED);
    budget.getAmount().setComparableValueType(
        testCampaign1.getBudget().getAmount().getComparableValueType());
    this.campaign1.setBudget(budget);

    this.campaign2.setStatus(CampaignStatus.DELETED);
    budget.getAmount().setComparableValueType(
        testCampaign2.getBudget().getAmount().getComparableValueType());
    this.campaign2.setBudget(budget);

    // Set the generated fields.
    this.campaign1.setCampaignStats(testCampaign1.getCampaignStats());
View Full Code Here

      manualCpc.setEnhancedCpcEnabled(false);
      biddingConfig.setBiddingScheme(manualCpc);
      goodCampaign.setBiddingStrategyConfiguration(biddingConfig);

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

      KeywordMatchSetting keywordMatch = new KeywordMatchSetting();
      keywordMatch.setOptIn(Boolean.TRUE);
      goodCampaign.setSettings(new Setting[] {keywordMatch});
View Full Code Here

      campaign.setBiddingStrategyConfiguration(biddingConfig);

      BudgetServiceInterface budgetService = user.getService(AdWordsService.V201306.BUDGET_SERVICE);

      // Create budget.
      Budget budget = new Budget();
      budget.setName("Interplanetary Budget #" + System.currentTimeMillis());
      budget.setPeriod(BudgetBudgetPeriod.DAILY);
      budget.setAmount(new Money(null, 50000000L));
      budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);

      // Add budget.
      BudgetOperation budgetOperation = new BudgetOperation();
      budgetOperation.setOperand(budget);
      budgetOperation.setOperator(Operator.ADD);
      BudgetReturnValue budgetReturnValue =
          budgetService.mutate(new BudgetOperation[] {budgetOperation});

      // Set the budget to the campaign.
      Budget createdBudget = new Budget();
      createdBudget.setBudgetId(budgetReturnValue.getValue(0).getBudgetId());
      campaign.setBudget(createdBudget);

      // Set the campaign network options to Search and Search Network.
      NetworkSetting networkSetting = new NetworkSetting();
      networkSetting.setTargetGoogleSearch(true);
View Full Code Here

      ManualCpmBiddingScheme manualCpm = new ManualCpmBiddingScheme();
      biddingConfig.setBiddingScheme(manualCpm);
      goodCampaign.setBiddingStrategyConfiguration(biddingConfig);

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

      // Create operations.
      CampaignOperation operation = new CampaignOperation();
      operation.setOperand(goodCampaign);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201402.cm.Budget

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.