public BatchResult unshareProfiles() throws IOException, ServiceException {
      if (this.profiles == null) {
        this.getAllProfiles();
      }
      BatchResult result = new BatchResult();
      Status status = new Status();
      int index = 0;

      status.setIndexed(false);
      while (index < this.profiles.size()) {
        ContactFeed requestFeed = new ContactFeed();

        for (int i = 0; i < this.batchSize && index < this.profiles.size(); ++i, ++index) {
          ContactEntry entry = this.profiles.get(index);

          entry.setStatus(status);
          BatchUtils.setBatchOperationType(entry, BatchOperationType.UPDATE);
          requestFeed.getEntries().add(entry);
        }

        ContactFeed responseFeed =
            myService.batch(new URL("https://www.google.com/m8/feeds/profiles/domain/"
                + this.domain + "/full/batch?xoauth_requestor_id=" + this.adminEmail), requestFeed);

        // Check the status of each operation.
        for (ContactEntry entry : responseFeed.getEntries()) {
          BatchStatus batchStatus = BatchUtils.getBatchStatus(entry);

          if (batchStatus.getCode() == 200) {
            result.setSuccess(result.getSuccess() + 1);
          } else {
            result.setError(result.getError() + 1);
            result.addErrorEntry(entry);
          }
        }
      }
      return result;
    }