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

Examples of com.google.api.adwords.v201306.jaxb.cm.Selector


      operation.setOperator(Operator.SET);

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

      // Update conversion.
      ConversionTrackerReturnValue result = service.mutate(operations);

      // Display conversion.
      if (result != null && result.getValue() != null) {
        for (ConversionTracker conversionTracker : result.getValue()) {
          if (conversionTracker instanceof AdWordsConversionTracker) {
            AdWordsConversionTracker newAdWordsConversionTracker =
                (AdWordsConversionTracker) conversionTracker;
            System.out.printf("Conversion with id \"%d\", name \"%s\", status \"%s\", "
                + "category \"%s\" and snippet \"%s\" was updated.\n",
View Full Code Here


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

      // Get the ConversionTrackerService.
      ConversionTrackerServiceInterface service =
          user.getService(AdWordsService.V201306.CONVERSION_TRACKER_SERVICE);

      // Replace with a valid value from your account.
      long conversionId = Long.parseLong("INSERT_CONVERSION_ID_HERE");

      // Create conversion with updated status and name.
      AdWordsConversionTracker adWordsConversionTracker = new AdWordsConversionTracker();
      adWordsConversionTracker.setId(conversionId);
      adWordsConversionTracker.setStatus(ConversionTrackerStatus.DISABLED);

      // Create operations.
      ConversionTrackerOperation operation = new ConversionTrackerOperation();
      operation.setOperand(adWordsConversionTracker);
      operation.setOperator(Operator.SET);

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

      // Update conversion.
      ConversionTrackerReturnValue result = service.mutate(operations);

      // Display conversion.
      if (result != null && result.getValue() != null) {
        for (ConversionTracker conversionTracker : result.getValue()) {
          if (conversionTracker instanceof AdWordsConversionTracker) {
View Full Code Here

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

      // Get the DataService.
      DataServiceInterface dataService =
          user.getService(AdWordsService.V201306.DATA_SERVICE);

      Long adGroupId = Long.parseLong("INSERT_AD_GROUP_ID_HERE");

      // Create selector.
      Selector selector = new Selector();
      selector.setFields(new String[] {"AdGroupId", "LandscapeType", "LandscapeCurrent",
          "StartDate", "EndDate", "Bid", "LocalClicks", "LocalCost", "MarginalCpc",
          "LocalImpressions"});

      // Create predicates.
      Predicate adGroupIdPredicate =
          new Predicate("AdGroupId", PredicateOperator.IN, new String[] {adGroupId.toString()});
      selector.setPredicates(new Predicate[] {adGroupIdPredicate});

      // Get bid landscape for ad group criteria.
      AdGroupBidLandscapePage page = dataService.getAdGroupBidLandscape(selector);

      // Display bid landscapes.
      if (page.getEntries() != null) {
        for (AdGroupBidLandscape adGroupBidLandscape : page.getEntries()) {
          System.out.println("Ad group bid landscape with ad group id \""
View Full Code Here

                        .getViolatingText());
                List<ExemptionRequest> exemptionRequests =
                    new ArrayList<ExemptionRequest>(Arrays
                        .asList(operation.getExemptionRequests() == null
                            ? new ExemptionRequest[] {} : operation.getExemptionRequests()));
                exemptionRequests.add(new ExemptionRequest(policyVioloationError.getKey()));
                operation
                    .setExemptionRequests(exemptionRequests.toArray(new ExemptionRequest[] {}));
              } else {
                // Remove non-exemptable operation.
                System.out.println("Removing non-exemptable operation at index " + operationIndex
View Full Code Here

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

      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

TOP

Related Classes of com.google.api.adwords.v201306.jaxb.cm.Selector

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.