Package com.google.api.ads.adwords.axis.v201406.mcm

Examples of com.google.api.ads.adwords.axis.v201406.mcm.AlertSelector


    alertQuery.setTriggerTimeSpec(TriggerTimeSpec.ALL_TIME);

    int offset = 0;

    // Create selector.
    AlertSelector selector = new AlertSelector();
    selector.setQuery(alertQuery);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AlertPage page = null;
    do {
      // Get all alerts.
      page = alertService.get(selector);

      // Display alerts.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (Alert alert : page.getEntries()) {
          System.out.printf(
              "Alert of type '%s' and severity '%s' for account '%d' was found.\n",
              alert.getAlertType(), alert.getAlertSeverity(),
              alert.getClientCustomerId());
        }
      } else {
        System.out.println("No alerts were found.\n");
      }
      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here


    alertQuery.setTriggerTimeSpec(TriggerTimeSpec.ALL_TIME);

    int offset = 0;

    // Create selector.
    AlertSelector selector = new AlertSelector();
    selector.setQuery(alertQuery);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AlertPage page = null;
    do {
      // Get all alerts.
      page = alertService.get(selector);

      // Display alerts.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (Alert alert : page.getEntries()) {
          System.out.printf(
              "Alert of type '%s' and severity '%s' for account '%d' was found.\n",
              alert.getAlertType(), alert.getAlertSeverity(),
              alert.getClientCustomerId());
        }
      } else {
        System.out.println("No alerts were found.\n");
      }
      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here

    alertQuery.setTriggerTimeSpec(TriggerTimeSpec.ALL_TIME);

    int offset = 0;

    // Create selector.
    AlertSelector selector = new AlertSelector();
    selector.setQuery(alertQuery);
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AlertPage page = null;
    do {
      // Get all alerts.
      page = alertService.get(selector);

      // Display alerts.
      if (page.getEntries() != null && page.getEntries().length > 0) {
        for (Alert alert : page.getEntries()) {
          System.out.printf(
              "Alert of type '%s' and severity '%s' for account '%d' was found.\n",
              alert.getAlertType(), alert.getAlertSeverity(),
              alert.getClientCustomerId());
        }
      } else {
        System.out.println("No alerts were found.\n");
      }
      offset += PAGE_SIZE;
      selector.getPaging().setStartIndex(offset);
    } while (offset < page.getTotalNumEntries());
  }
View Full Code Here

    // Create base class criterion to avoid setting keyword specific fields.
    Criterion criterion = new Criterion();
    criterion.setId(criterionId);

    // Create ad group criterion.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);
View Full Code Here

    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);
View Full Code Here

    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      System.out.println("Ad group criterion with ad group id \""
          + adGroupCriterionResult.getAdGroupId() + "\", criterion id \""
          + adGroupCriterionResult.getCriterion().getId() + "\", and type \""
          + adGroupCriterionResult.getCriterion().getCriterionType() + "\" was removed.");
    }
View Full Code Here

  public static void runExample(
      AdWordsServices adWordsServices, AdWordsSession session, long adGroupId,
      long criterionId) throws Exception {
    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        adWordsServices.get(session, AdGroupCriterionServiceInterface.class);

    // Create base class criterion to avoid setting keyword specific fields.
    Criterion criterion = new Criterion();
    criterion.setId(criterionId);

    // Create ad group criterion.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion();
    adGroupCriterion.setAdGroupId(adGroupId);
    adGroupCriterion.setCriterion(criterion);

    // Create operations.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
    operation.setOperand(adGroupCriterion);
    operation.setOperator(Operator.REMOVE);

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

    // Remove ad group criteria.
    AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);

    // Display ad group criteria.
    for (AdGroupCriterion adGroupCriterionResult : result.getValue()) {
      System.out.println("Ad group criterion with ad group id \""
          + adGroupCriterionResult.getAdGroupId() + "\", criterion id \""
View Full Code Here

    // Get the BudgetService.
    BudgetServiceInterface budgetService =
        adWordsServices.get(session, BudgetServiceInterface.class);

    // Create a budget, which can be shared by multiple video campaigns.
    Budget sharedBudget = new Budget();
    sharedBudget.setName("Interplanetary Cruise #" + System.currentTimeMillis());
    Money budgetAmount = new Money();
    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);
View Full Code Here

    budgetAmount.setMicroAmount(50000000L);
    sharedBudget.setAmount(budgetAmount);
    sharedBudget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    sharedBudget.setPeriod(BudgetBudgetPeriod.DAILY);

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget and get the budget ID.
    BudgetReturnValue budgetResult = budgetService.mutate(
        new BudgetOperation[] {budgetOperation});
    Long budgetId = budgetResult.getValue(0).getBudgetId();
View Full Code Here

    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(sharedBudget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget and get the budget ID.
    BudgetReturnValue budgetResult = budgetService.mutate(
        new BudgetOperation[] {budgetOperation});
    Long budgetId = budgetResult.getValue(0).getBudgetId();

    // Get the VideoCampaignService.
    VideoCampaignServiceInterface videoCampaignService =
        adWordsServices.get(session, VideoCampaignServiceInterface.class);
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.axis.v201406.mcm.AlertSelector

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.