Package com.google.api.adwords.v201309.cm

Examples of com.google.api.adwords.v201309.cm.AdGroupCriterionPage


      operation.setOperator(Operator.SET);

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

      // Update ad group.
      AdGroupReturnValue result = adGroupService.mutate(operations);

      // Display ad groups.
      if (result != null && result.getValue() != null) {
        for (AdGroup adGroupResult : result.getValue()) {
          System.out.println("Ad group with name \"" + adGroupResult.getName() + "\", id \""
              + adGroupResult.getId() + "\", and status \"" + adGroupResult.getStatus()
              + "\" was updated.");
        }
      } else {
View Full Code Here


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

      // Get the AdGroupService.
      AdGroupServiceInterface adGroupService =
          user.getService(AdWordsService.V201309.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);

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

      // Delete ad group.
      AdGroupReturnValue result = adGroupService.mutate(operations);

      // Display ad groups.
      if (result != null && result.getValue() != null) {
        for (AdGroup adGroupResult : result.getValue()) {
          System.out.println("Ad group with name \"" + adGroupResult.getName() + "\" and id \""
View Full Code Here

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

      // Get the AdGroupService.
      AdGroupServiceInterface adGroupService =
          user.getService(AdWordsService.V201309.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);

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

      // Update ad group.
      AdGroupReturnValue result = adGroupService.mutate(operations);

      // Display ad groups.
      if (result != null && result.getValue() != null) {
        for (AdGroup adGroupResult : result.getValue()) {
          System.out.println("Ad group with name \"" + adGroupResult.getName() + "\", id \""
View Full Code Here

      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");
      long keywordId = Long.parseLong("INSERT_KEYWORD_ID_HERE");

      // Create ad params.
      AdParam adParam1 = new AdParam();
      adParam1.setAdGroupId(adGroupId);
      adParam1.setCriterionId(keywordId);
      adParam1.setInsertionText("100");
      adParam1.setParamIndex(1);

      AdParam adParam2 = new AdParam();
      adParam2.setAdGroupId(adGroupId);
      adParam2.setCriterionId(keywordId);
      adParam2.setInsertionText("$40");
      adParam2.setParamIndex(2);

      // Create operations.
      AdParamOperation adParamOperation1 = new AdParamOperation();
      adParamOperation1.setOperand(adParam1);
      adParamOperation1.setOperator(Operator.SET);
View Full Code Here

      adParam2.setCriterionId(keywordId);
      adParam2.setInsertionText("$40");
      adParam2.setParamIndex(2);

      // Create operations.
      AdParamOperation adParamOperation1 = new AdParamOperation();
      adParamOperation1.setOperand(adParam1);
      adParamOperation1.setOperator(Operator.SET);

      AdParamOperation adParamOperation2 = new AdParamOperation();
      adParamOperation2.setOperand(adParam2);
      adParamOperation2.setOperator(Operator.SET);

      AdParamOperation[] operations = new AdParamOperation[] {adParamOperation1, adParamOperation2};

      // Set ad parameters.
      AdParam[] adParams = adParamService.mutate(operations);
View Full Code Here

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

      // Get the AdParamService.
      AdParamServiceInterface adParamService =
          user.getService(AdWordsService.V201309.AD_PARAM_SERVICE);

      long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");
      long keywordId = Long.parseLong("INSERT_KEYWORD_ID_HERE");

      // Create ad params.
      AdParam adParam1 = new AdParam();
      adParam1.setAdGroupId(adGroupId);
      adParam1.setCriterionId(keywordId);
      adParam1.setInsertionText("100");
      adParam1.setParamIndex(1);

      AdParam adParam2 = new AdParam();
      adParam2.setAdGroupId(adGroupId);
      adParam2.setCriterionId(keywordId);
      adParam2.setInsertionText("$40");
      adParam2.setParamIndex(2);

      // Create operations.
      AdParamOperation adParamOperation1 = new AdParamOperation();
      adParamOperation1.setOperand(adParam1);
      adParamOperation1.setOperator(Operator.SET);

      AdParamOperation adParamOperation2 = new AdParamOperation();
      adParamOperation2.setOperand(adParam2);
      adParamOperation2.setOperator(Operator.SET);

      AdParamOperation[] operations = new AdParamOperation[] {adParamOperation1, adParamOperation2};

      // Set ad parameters.
      AdParam[] adParams = adParamService.mutate(operations);

      // Display ad parameters.
      if (adParams != null) {
        for (AdParam adParam : adParams) {
          System.out.println("Ad parameter with ad group id \"" + adParam.getAdGroupId()
View Full Code Here

      // Get the GeoLocationService.
      GeoLocationServiceInterface geoLocationService =
          user.getService(AdWordsService.V201309.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});
View Full Code Here

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
            BiddableAdGroupCriterion biddableAdGroupCriterion =
                (BiddableAdGroupCriterion) adGroupCriterion;
            System.out.println("Ad group criterion with ad group id \""
                + biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""
                + biddableAdGroupCriterion.getCriterion().getId() + "\", type \""
                + biddableAdGroupCriterion.getCriterion().getCriterionType()
                + "\", and user status \"" + biddableAdGroupCriterion.getUserStatus()
                + "\" was found.");
          }
        }
      } else {
        System.out.println("No ad group criteria were found.");
View Full Code Here

      // Display ad group criteria.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (AdGroupCriterion adGroupCriterion : page.getEntries()) {
          if (adGroupCriterion instanceof BiddableAdGroupCriterion) {
            BiddableAdGroupCriterion biddableAdGroupCriterion =
                (BiddableAdGroupCriterion) adGroupCriterion;
            System.out.println("Ad group criterion with ad group id \""
                + biddableAdGroupCriterion.getAdGroupId() + "\", criterion id \""
                + biddableAdGroupCriterion.getCriterion().getId() + "\", type \""
                + biddableAdGroupCriterion.getCriterion().getCriterionType()
                + "\", and user status \"" + biddableAdGroupCriterion.getUserStatus()
                + "\" was found.");
          }
        }
      } else {
        System.out.println("No ad group criteria were found.");
View Full Code Here

          user.getService(AdWordsService.V201309.CAMPAIGN_SERVICE);

      long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");

      // Create campaign with updated budget.
      Campaign campaign = new Campaign();
      campaign.setId(campaignId);
      campaign.setStatus(CampaignStatus.PAUSED);

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

TOP

Related Classes of com.google.api.adwords.v201309.cm.AdGroupCriterionPage

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.