Gets a request that restores a trashed folder

@param id        id of folder to restore
@return      request to restore a folder from the trash
961648
public BoxRequestsFolder.RestoreTrashedFolder getRestoreTrashedFolderRequest(String id) {
        BoxRequestsFolder.RestoreTrashedFolder request = new BoxRequestsFolder.RestoreTrashedFolder(id, getFolderInfoUrl(id), mSession);
        return request;
    }
1297377
public Downloadable getById(String id) {
        for (Downloadable d : Downloadable.all())
            if(d.getId().equals(id))
                return d;
        return null;
    }
101371
public static File retrieve(String id, RequestOptions options) throws StripeException {
    return retrieve(id, null, options);
  }
1330316
public Object requestGet(final String id, Class type) throws SDKException {
    String url = this.pathUrl;
    if (id != null) {
      url += "/" + id;
      return requestGetWithStatus(url, null, type);
    } else {
      return requestGetAll(url, type, null);
    }
  }
361651
@RequestMapping(value = "/getThumbnail.action", method = RequestMethod.GET)
    public ResponseEntity<?> getThumbnail(@RequestParam Integer id) {

        final HttpHeaders responseHeaders = new HttpHeaders();
        Map<String, Object> responseMap;

        try {
            // try to get the image
            ImageFile image = service.findById(id);
            if (image == null) {
                throw new Exception("Could not find the image with id " + id);
            }

            byte[] imageBytes = null;

            imageBytes = image.getThumbnail();

            responseHeaders.setContentType(
                MediaType.parseMediaType(image.getFileType()));

            LOG.info("Successfully got the image thumbnail " +
                image.getFileName());

            return new ResponseEntity<byte[]>(
                imageBytes, responseHeaders, HttpStatus.OK);
        } catch (Exception e) {
            final String errorMessage = "Could not get the image thumbnail: "
                + e.getMessage();

            LOG.error(errorMessage);
            responseMap = ResultSet.error(errorMessage);

            responseHeaders.setContentType(MediaType.APPLICATION_JSON);

            return new ResponseEntity<Map<String, Object>>(
                responseMap, responseHeaders, HttpStatus.OK);
        }
    }
1098094
@DELETE
    @Path("/{id}")
    public Response delete(@PathParam("id") final String id)
            throws IOException {
        return execute(getResourceRequest(RequestTypeEnum.DELETE, RestOperationTypeEnum.DELETE).id(id));
    }
953180
public BoxRequestsFolder.UpdateFolder getRenameRequest(String id, String newName) {
        BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession)
                .setName(newName);
        return request;
    }
984189
public BoxRequestsFolder.DeleteFolderFromCollection getDeleteFromCollectionRequest(String id) {
        BoxRequestsFolder.DeleteFolderFromCollection request = new BoxRequestsFolder.DeleteFolderFromCollection(id, getFolderInfoUrl(id), mSession);
        return request;
    }
230009
public BoxRequestsBookmark.RestoreTrashedBookmark getRestoreTrashedBookmarkRequest(String id) {
        BoxRequestsBookmark.RestoreTrashedBookmark request = new BoxRequestsBookmark.RestoreTrashedBookmark(id, getBookmarkInfoUrl(id), mSession);
        return request;
    }
500564
public BoxRequestsFolder.UpdateSharedFolder getCreateSharedLinkRequest(String id) {
        BoxRequestsFolder.UpdateSharedFolder request = new BoxRequestsFolder.UpdateSharedFolder(id, getFolderInfoUrl(id), mSession)
                .setAccess(null);
        return request;
    }
897910
public function restore($id)
    {
        $content = $this->repository->getDeletedById($id);
        if (!empty($content)) {
            $this->authorize('update', $content);
            $content->restore();
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
1171778
private HashSet<String> get(String id) throws IOException {
    if (collectionCachePath != null) {
      Date date = clear();
      if (idToVersion.containsKey(id)) {
        String version = idToVersion.get(id);
        expirationVersion.put(version, date.getTime() + (1000 * lifeTime));
        MtasSolrCollectionCacheItem newItem = read(version, date.getTime());
        if (newItem != null && newItem.id.equals(id)) {
          return newItem.data;
        } else {
          log.error("couldn't get " + version);
          // delete file and remove from index
          if (!collectionCachePath.resolve(version).toFile().delete()) {
            log.debug("couldn't delete " + version);
          }
          idToVersion.remove(id);
          expirationVersion.remove(version);
          versionToItem.remove(version);
        }
      } else {
        log.error("doesn't exist anymore");
      }
      return null;
    } else

    {
      throw new IOException("no cachePath available, can't get data");
    }
  }
142515
public RegisteredServiceDocument get(final long id) {
        try {
            return this.get(String.valueOf(id));
        } catch (final DocumentNotFoundException e) {
            LOGGER.debug("Service [{}] not found. [{}]", id, e.getMessage());
            return null;
        }
    }
975180
@Override
    @Transactional
    public Restoration restartRestore(String restoreId) throws SnapshotException {
        Restoration restoration = this.jobManager.stopRestore(restoreId);
        restoration.setEndDate(null);
        restoration.setStatus(RestoreStatus.RETRIEVING_FROM_STORAGE);
        restoration = restoreRepo.save(restoration);
        eventLog.logRestoreUpdate(restoration);
        return this.restoreCompleted(restoration);
    }
691776
public BoxRequestsComment.GetCommentInfo getInfoRequest(String id) {
        BoxRequestsComment.GetCommentInfo request = new BoxRequestsComment.GetCommentInfo(id, getCommentInfoUrl(id), mSession);
        return request;
    }
453209
@Override
    public Restoration get(String restorationId)
        throws RestorationNotFoundException {
        Restoration restoration = this.restoreRepo.findByRestorationId(restorationId);
        if (restoration == null) {
            log.debug("Restoration returned null for {}. Throwing exception...",
                      restorationId);
            throw new RestorationNotFoundException(restorationId);
        }

        log.debug("got restoration {}", restoration);
        return restoration;
    }
1312555
def restore_recycle_bin(self, fs_id, **kwargs):
        

        data = {
            'fs_id': fs_id,
        }
        return self._request('file', 'restore', data=data, **kwargs)