Package com.google.api.ads.dfp.axis.v201311

Examples of com.google.api.ads.dfp.axis.v201311.UpdateResult


      com.google.api.ads.dfp.axis.v201311.AssignAdUnitsToPlacement action =
          new com.google.api.ads.dfp.axis.v201311.AssignAdUnitsToPlacement();
      action.setPlacementId(placementId);

      // Perform action.
      UpdateResult result =
          inventoryService.performAdUnitAction(action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf(
            "Number of ad units to be added to placement: %d\n", result.getNumChanges());
      } else {
        System.out.println("No ad units were added to placement.");
      }
    }
  }
View Full Code Here


      // Create action.
      com.google.api.ads.dfp.axis.v201311.DeleteCustomTargetingKeys action =
          new com.google.api.ads.dfp.axis.v201311.DeleteCustomTargetingKeys();

      // Perform action.
      UpdateResult result = customTargetingService.performCustomTargetingKeyAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of custom targeting keys deleted: %d\n", result.getNumChanges());
      } else {
        System.out.println("No custom targeting keys were deleted.");
      }
    }
  }
View Full Code Here

      // Create action.
      com.google.api.ads.dfp.axis.v201311.DeleteCustomTargetingValues action =
          new com.google.api.ads.dfp.axis.v201311.DeleteCustomTargetingValues();

      // Perform action.
      UpdateResult result = customTargetingService.performCustomTargetingValueAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf(
            "Number of custom targeting values deleted: %d\n", result.getNumChanges());
      } else {
        System.out.println("No custom targeting values deleted.");
      }
    }
  }
View Full Code Here

      // Create action.
      com.google.api.ads.dfp.axis.v201311.ArchiveAdUnits action =
          new com.google.api.ads.dfp.axis.v201311.ArchiveAdUnits();

      // Perform action.
      UpdateResult result =
          inventoryService.performAdUnitAction(action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of ad units archived: %d\n", result.getNumChanges());
      } else {
        System.out.println("No ad units were archived.");
      }
    }
  }
View Full Code Here

      // Create action.
      DeactivateLineItemCreativeAssociations action = new DeactivateLineItemCreativeAssociations();

      // Perform action.
      UpdateResult result = licaService.performLineItemCreativeAssociationAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of LICAs deactivated: %d\n", result.getNumChanges());
      } else {
        System.out.println("No LICAs were deactivated.");
      }
    }
  }
View Full Code Here

      // Create action.
      com.google.api.ads.dfp.axis.v201311.DeleteUserTeamAssociations action =
          new com.google.api.ads.dfp.axis.v201311.DeleteUserTeamAssociations();

      // Perform action.
      UpdateResult result = userTeamAssociationService.performUserTeamAssociationAction(
          action, statementBuilder.toStatement());

      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of user team associations deleted: %d\n",
            result.getNumChanges());
      } else {
        System.out.println("No user team associations were deleted.");
      }
    }
  }
View Full Code Here

        // Create action.
        DeleteUserTeamAssociations action = new DeleteUserTeamAssociations();

        // Perform action.
        UpdateResult result =
            userTeamAssociationService.performUserTeamAssociationAction(action, filterStatement);

        // Display results.
        if (result != null && result.getNumChanges() > 0) {
          System.out.println("Number of teams that the user was removed from: "
              + result.getNumChanges());
        } else {
          System.out.println("No user team associations were deleted.");
        }
      }
    } catch (Exception e) {
View Full Code Here

        // Create action.
        DeactivateCustomFields action = new DeactivateCustomFields();

        // Perform action.
        UpdateResult result = customFieldService.performCustomFieldAction(action, filterStatement);

        // Display results.
        if (result != null && result.getNumChanges() > 0) {
          System.out.println("Number of custom fields deactivated: " + result.getNumChanges());
        } else {
          System.out.println("No custom fields were deactivated.");
        }
      }
    } catch (Exception e) {
View Full Code Here

        // Create action.
        DeleteCustomTargetingValues action = new DeleteCustomTargetingValues();

        // Perform action.
        UpdateResult result = customTargetingService.performCustomTargetingValueAction(
            action, statementBuilder.toStatement());

        // Display results.
        if (result != null && result.getNumChanges() > 0) {
          System.out.println("Number of custom targeting values deleted: "
              + result.getNumChanges());
        } else {
          System.out.println("No custom targeting values were deleted.");
        }
      }
    } catch (Exception e) {
View Full Code Here

        // Create action.
        ActivateLineItems action = new ActivateLineItems();

        // Perform action.
        UpdateResult result = lineItemService.performLineItemAction(action, filterStatement);

        // Display results.
        if (result != null && result.getNumChanges() > 0) {
          System.out.println("Number of line items activated: " + result.getNumChanges());
        } else {
          System.out.println("No line items were activated.");
        }
      }
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.axis.v201311.UpdateResult

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.