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

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


    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

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

TOP

Related Classes of com.google.api.adwords.v201306.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.