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

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


      Experiment experiment = new Experiment();
      experiment.setId(experimentId);
      experiment.setStatus(ExperimentStatus.PROMOTED);

      // Create operation.
      ExperimentOperation operation = new ExperimentOperation();
      operation.setOperand(experiment);
      operation.setOperator(Operator.SET);

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

      // Promote experiment.
      ExperimentReturnValue result = experimentService.mutate(operations);
View Full Code Here


      operation.setOperator(Operator.SET);

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

      // Promote experiment.
      ExperimentReturnValue result = experimentService.mutate(operations);

      // Display experiments.
      if (result.getValue() != null) {
        for(Experiment experimentResult : result.getValue()) {
          System.out.println("Experiment with name \"" + experimentResult.getName()
              + "\" and id \"" + experimentResult.getId() + "\" was promoted.");
        }
      } else {
        System.out.println ("No experiments were promoted.");
View Full Code Here

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

      // Get the ExperimentService.
      ExperimentServiceInterface experimentService =
          user.getService(AdWordsService.V201306.EXPERIMENT_SERVICE);

      long experimentId = Long.parseLong("INSERT_EXPERIMENT_ID_HERE");

      // Create experiment with PROMOTED status.
      Experiment experiment = new Experiment();
      experiment.setId(experimentId);
      experiment.setStatus(ExperimentStatus.PROMOTED);

      // Create operation.
      ExperimentOperation operation = new ExperimentOperation();
      operation.setOperand(experiment);
      operation.setOperator(Operator.SET);

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

      // Promote experiment.
      ExperimentReturnValue result = experimentService.mutate(operations);

      // Display experiments.
      if (result.getValue() != null) {
        for(Experiment experimentResult : result.getValue()) {
          System.out.println("Experiment with name \"" + experimentResult.getName()
View Full Code Here

      Address address3 = new Address();
      address3.setStreetAddress("五四大街1号, Beijing东城区");
      address3.setCountryCode("CN");

      // Create selector.
      GeoLocationSelector selector = new GeoLocationSelector();
      selector.setAddresses(new Address[] {address1, address2, address3});

      // Get geo locations.
      GeoLocation[] locations = geoLocationService.get(selector);

      // Display geo locations.
View Full Code Here

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

      // Get the GeoLocationService.
      GeoLocationServiceInterface geoLocationService =
          user.getService(AdWordsService.V201306.GEO_LOCATION_SERVICE);

      // Create addresses.
      Address address1 = new Address();
      address1.setStreetAddress("1600 Amphitheatre Pkwy");
      address1.setCityName("Mountain View");
      address1.setProvinceCode("US-CA");
      address1.setPostalCode("94043");
      address1.setCountryCode("US");

      Address address2 = new Address();
      address2.setStreetAddress("76 9th Ave");
      address2.setCityName("New York");
      address2.setProvinceCode("US-NY");
      address2.setPostalCode("10011");
      address2.setCountryCode("US");

      Address address3 = new Address();
      address3.setStreetAddress("五四大街1号, Beijing东城区");
      address3.setCountryCode("CN");

      // Create selector.
      GeoLocationSelector selector = new GeoLocationSelector();
      selector.setAddresses(new Address[] {address1, address2, address3});

      // Get geo locations.
      GeoLocation[] locations = geoLocationService.get(selector);

      // Display geo locations.
      if (locations != null) {
        for (GeoLocation location : locations) {
          if (location instanceof InvalidGeoLocation) {
View Full Code Here

      List<AdGroupEstimateRequest> adGroupEstimateRequests =
          new ArrayList<AdGroupEstimateRequest>();
      AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest();
      adGroupEstimateRequest.setKeywordEstimateRequests(
          keywordEstimateRequests.toArray(new KeywordEstimateRequest[]{}));
      adGroupEstimateRequest.setMaxCpc(new Money(null, 1000000L));
      adGroupEstimateRequests.add(adGroupEstimateRequest);

      // Create campaign estimate requests.
      List<CampaignEstimateRequest> campaignEstimateRequests =
        new ArrayList<CampaignEstimateRequest>();
View Full Code Here

      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);
View Full Code Here

      biddableAdGroupCriterion.setAdGroupId(adGroupId);
      biddableAdGroupCriterion.setCriterion(criterion);

      BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration();
      CpcBid cpcBid = new CpcBid();
      cpcBid.setBid(new Money(null, 1000000L));
      biddingConfig.setBids(new Bids[] {cpcBid});
      biddableAdGroupCriterion.setBiddingStrategyConfiguration(biddingConfig);

      // Create operations.
      AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
View Full Code Here

      // 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);
View Full Code Here

      adGroup.setSettings(new Setting[] {targeting});

      // Created the bids.
      BiddingStrategyConfiguration biddingConfig = new BiddingStrategyConfiguration();
      CpcBid cpcBid = new CpcBid();
      cpcBid.setBid(new Money(null, 1000000L));
      biddingConfig.setBids(new Bids[] {cpcBid});
      adGroup.setBiddingStrategyConfiguration(biddingConfig);
     
      // Create operations.
      AdGroupOperation operation = new AdGroupOperation();
View Full Code Here

TOP

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

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.