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

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


  }

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    // Get the AlertService.
    AlertServiceInterface alertService =
      adWordsServices.get(session, AlertServiceInterface.class);

    // Create alert query.
    AlertQuery alertQuery = new AlertQuery();
    alertQuery.setClientSpec(ClientSpec.ALL);
    alertQuery.setFilterSpec(FilterSpec.ALL);
    alertQuery.setTypes(new AlertType[] {AlertType.ACCOUNT_BUDGET_BURN_RATE,
        AlertType.ACCOUNT_BUDGET_ENDING, AlertType.ACCOUNT_ON_TARGET, AlertType.CAMPAIGN_ENDED,
        AlertType.CAMPAIGN_ENDING, AlertType.CREDIT_CARD_EXPIRING, AlertType.DECLINED_PAYMENT,
        AlertType.MANAGER_LINK_PENDING, AlertType.MISSING_BANK_REFERENCE_NUMBER,
        AlertType.PAYMENT_NOT_ENTERED, AlertType.TV_ACCOUNT_BUDGET_ENDING,
        AlertType.TV_ACCOUNT_ON_TARGET, AlertType.TV_ZERO_DAILY_SPENDING_LIMIT,
        AlertType.USER_INVITE_ACCEPTED, AlertType.USER_INVITE_PENDING,
        AlertType.ZERO_DAILY_SPENDING_LIMIT});
    alertQuery.setSeverities(new AlertSeverity[] {AlertSeverity.GREEN, AlertSeverity.YELLOW,
        AlertSeverity.RED});
    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(
View Full Code Here


  }

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    // Get the AlertService.
    AlertServiceInterface alertService =
      adWordsServices.get(session, AlertServiceInterface.class);

    // Create alert query.
    AlertQuery alertQuery = new AlertQuery();
    alertQuery.setClientSpec(ClientSpec.ALL);
    alertQuery.setFilterSpec(FilterSpec.ALL);
    alertQuery.setTypes(new AlertType[] {AlertType.ACCOUNT_BUDGET_BURN_RATE,
        AlertType.ACCOUNT_BUDGET_ENDING, AlertType.ACCOUNT_ON_TARGET, AlertType.CAMPAIGN_ENDED,
        AlertType.CAMPAIGN_ENDING, AlertType.CREDIT_CARD_EXPIRING, AlertType.DECLINED_PAYMENT,
        AlertType.MANAGER_LINK_PENDING, AlertType.MISSING_BANK_REFERENCE_NUMBER,
        AlertType.PAYMENT_NOT_ENTERED, AlertType.TV_ACCOUNT_BUDGET_ENDING,
        AlertType.TV_ACCOUNT_ON_TARGET, AlertType.TV_ZERO_DAILY_SPENDING_LIMIT,
        AlertType.USER_INVITE_ACCEPTED, AlertType.USER_INVITE_PENDING,
        AlertType.ZERO_DAILY_SPENDING_LIMIT});
    alertQuery.setSeverities(new AlertSeverity[] {AlertSeverity.GREEN, AlertSeverity.YELLOW,
        AlertSeverity.RED});
    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(
View Full Code Here

  }

  public static void runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    // Get the AlertService.
    AlertServiceInterface alertService =
      adWordsServices.get(session, AlertServiceInterface.class);

    // Create alert query.
    AlertQuery alertQuery = new AlertQuery();
    alertQuery.setClientSpec(ClientSpec.ALL);
    alertQuery.setFilterSpec(FilterSpec.ALL);
    alertQuery.setTypes(new AlertType[] {AlertType.ACCOUNT_BUDGET_BURN_RATE,
        AlertType.ACCOUNT_BUDGET_ENDING, AlertType.ACCOUNT_ON_TARGET, AlertType.CAMPAIGN_ENDED,
        AlertType.CAMPAIGN_ENDING, AlertType.CREDIT_CARD_EXPIRING, AlertType.DECLINED_PAYMENT,
        AlertType.MANAGER_LINK_PENDING, AlertType.MISSING_BANK_REFERENCE_NUMBER,
        AlertType.PAYMENT_NOT_ENTERED, AlertType.TV_ACCOUNT_BUDGET_ENDING,
        AlertType.TV_ACCOUNT_ON_TARGET, AlertType.TV_ZERO_DAILY_SPENDING_LIMIT,
        AlertType.USER_INVITE_ACCEPTED, AlertType.USER_INVITE_PENDING,
        AlertType.ZERO_DAILY_SPENDING_LIMIT});
    alertQuery.setSeverities(new AlertSeverity[] {AlertSeverity.GREEN, AlertSeverity.YELLOW,
        AlertSeverity.RED});
    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(
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.AlertServiceInterface

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.