code: public static void runExample(
        AdManagerServices adManagerServices, AdManagerSession session, long productPackageItemId)
        throws RemoteException {
      // Get the ProductPackageItemItemService.
      ProductPackageItemServiceInterface productPackageItemService =
          adManagerServices.get(session, ProductPackageItemServiceInterface.class);
  
      // Create a statement to select a single product package item.
      StatementBuilder statementBuilder =
          new StatementBuilder()
              .where("id = :id")
              .orderBy("id ASC")
              .limit(1)
              .withBindVariableValue("id", productPackageItemId);
  
      // Get the product package item.
      ProductPackageItemPage page =
          productPackageItemService.getProductPackageItemsByStatement(statementBuilder.toStatement());
  
      ProductPackageItem productPackageItemItem =
          Iterables.getOnlyElement(Arrays.asList(page.getResults()));
  
      System.out.printf(
          "Product package with ID %d will be archived.%n", productPackageItemItem.getId());
  
      // Remove limit and offset from statement.
      statementBuilder.removeLimitAndOffset();
  
      // Create action to archive product package items.
      com.google.api.ads.admanager.axis.v201811.ArchiveProductPackageItems action =
          new com.google.api.ads.admanager.axis.v201811.ArchiveProductPackageItems();
  
      // Perform action.
      UpdateResult result =
          productPackageItemService.performProductPackageItemAction(
              action, statementBuilder.toStatement());
  
      if (result != null && result.getNumChanges() > 0) {
        System.out.printf("Number of product package items archived: %d%n", result.getNumChanges());
      } else {
        System.out.println("No product package items were archived.");
      }
    }
docs: Runs the example.
  
  @param adManagerServices the services factory.
  @param session the session.
  @param productPackageItemId the ID of the product package item to archive.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.