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

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


          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - keyword '%s' failed due to '%s'\n",
          ((Keyword) operations.get(index).getOperand().getCriterion()).getText(), reason);
    }
View Full Code Here


          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - placement '%s' failed due to '%s'\n",
          ((Placement) operations.get(index).getOperand().getCriterion()).getUrl(), reason);
    }
View Full Code Here

          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - keyword '%s' failed due to '%s'\n",
          ((Keyword) operations.get(index).getOperand().getCriterion()).getText(), reason);
    }
View Full Code Here

          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - placement '%s' failed due to '%s'\n",
          ((Placement) operations.get(index).getOperand().getCriterion()).getUrl(), reason);
    }
View Full Code Here

          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - keyword '%s' failed due to '%s'\n",
          ((Keyword) operations.get(index).getOperand().getCriterion()).getText(), reason);
    }
View Full Code Here

          + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
    }

    // Status must be COMPLETED.
    // Get the job result. Here we re-use the same selector.
    JobResult result = mutateJobService.getResult(selector);

    // Output results.
    int i = 0;
    for (Operand operand : result.getSimpleMutateResult().getResults()) {
      String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
      System.out.printf("Operation [%d] - %s\n", i++, outcome);
    }

    // Output errors.
    for (ApiError error : result.getSimpleMutateResult().getErrors()) {
      int index = getOperationIndex(error.getFieldPath());
      String reason = error.getErrorString();
      System.out.printf("ERROR - keyword '%s' failed due to '%s'\n",
          ((Keyword) operations.get(index).getOperand().getCriterion()).getText(), reason);
    }
View Full Code Here

            + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
      }

      // Status must be COMPLETED.
      // Get the job result. Here we re-use the same selector.
      JobResult result = mutateJobService.getResult(selector);

      // Output results.
      int i = 0;
      for (Operand operand : result.getSimpleMutateResult().getResults()) {
        String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
        System.out.printf("Operation [%d] - %s\n", i++, outcome);
      }

      // Output errors.
      if (result.getSimpleMutateResult().getErrors() != null) {
        for (ApiError error : result.getSimpleMutateResult().getErrors()) {
          int index = getOperationIndex(error.getFieldPath());
          String reason = error.getErrorString();
          System.out.printf("ERROR - keyword '%s' failed due to '%s'\n",
              ((Keyword) operations.get(index).getOperand().getCriterion()).getText(), reason);
        }
View Full Code Here

            + ((RETRIES_COUNT - 1) * RETRY_INTERVAL) + " seconds.");
      }

      // Status must be COMPLETED.
      // Get the job result. Here we re-use the same selector.
      JobResult result = mutateJobService.getResult(selector);

      // Output results.
      int i = 0;
      for (Operand operand : result.getSimpleMutateResult().getResults()) {
        String outcome = operand.getPlaceHolder() == null ? "SUCCESS" : "FAILED";
        System.out.printf("Operation [%d] - %s\n", i++, outcome);
      }

      // Output errors.
      if (result.getSimpleMutateResult().getErrors() != null) {
        for (ApiError error : result.getSimpleMutateResult().getErrors()) {
          int index = getOperationIndex(error.getFieldPath());
          String reason = error.getErrorString();
          System.out.printf("ERROR - placement '%s' failed due to '%s'\n",
              ((Placement) operations.get(index).getOperand().getCriterion()).getUrl(), reason);
        }
View Full Code Here

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

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

TOP

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

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.