Gets a request that copies a bookmark

@param id    id of the bookmark to copy
@param parentId  id of the parent folder to copy the bookmark into
@return  request to copy a bookmark
504449
public BoxRequestsBookmark.CopyBookmark getCopyRequest(String id, String parentId) {
        BoxRequestsBookmark.CopyBookmark request = new BoxRequestsBookmark.CopyBookmark(id, parentId, getBookmarkCopyUrl(id), mSession);
        return request;
    }
955618
public BoxRequestsFile.UpdateFile getMoveRequest(String id, String parentId) {
        BoxRequestsFile.UpdateFile request = new BoxRequestsFile.UpdateFile(id, getFileInfoUrl(id), mSession);
        request.setParentId(parentId);
        return request;
    }
179820
public BoxRequestsBookmark.GetTrashedBookmark getTrashedBookmarkRequest(String id) {
        BoxRequestsBookmark.GetTrashedBookmark request = new BoxRequestsBookmark.GetTrashedBookmark(id, getTrashedBookmarkUrl(id), mSession);
        return request;
    }
619410
public BoxRequestsBookmark.DeleteBookmarkFromCollection getDeleteFromCollectionRequest(String id) {
        BoxRequestsBookmark.DeleteBookmarkFromCollection request = new BoxRequestsBookmark.DeleteBookmarkFromCollection(id, getBookmarkInfoUrl(id), mSession);
        return request;
    }
183675
public BoxRequestsFolder.CopyFolder getCopyRequest(String id, String parentId) {
        BoxRequestsFolder.CopyFolder request = new BoxRequestsFolder.CopyFolder(id, parentId, getFolderCopyUrl(id), mSession);
        return request;
    }
445446
public Permalink get(String id) {
        for (Permalink p : this)
            if(p.getId().equals(id))
                return p;
        return null;
    }
1145756
public BoxRequestsFile.GetTrashedFile getTrashedFileRequest(String id) {
        BoxRequestsFile.GetTrashedFile request = new BoxRequestsFile.GetTrashedFile(id, getTrashedFileUrl(id), mSession);
        return request;
    }
876940
public CMFolder addChild( String id, String name )
    {
        CMFolder childFolder = new CMFolder( id, name );
        childFolder.parent = this;
        this.children.put( name, childFolder );
        return childFolder;
    }
1078861
public BoxRequestsFolder.UpdateFolder getMoveRequest(String id, String parentId) {
        BoxRequestsFolder.UpdateFolder request = new BoxRequestsFolder.UpdateFolder(id, getFolderInfoUrl(id), mSession)
                .setParentId(parentId);
        return request;
    }
1363284
function isBookmarkInFolder(uri, folderId)
{
  var ids = bookmarksService.getBookmarkIdsForURI(uri, {});
  for (let i = 0; i < ids.length; i++) {
    if (bookmarksService.getFolderIdForItem(ids[i]) == folderId)
      return true;
  }

  return false;
}
1257344
public BoxRequestsFolder.CreateFolder getCreateRequest(String parentId, String name) {
        BoxRequestsFolder.CreateFolder request = new BoxRequestsFolder.CreateFolder(parentId, name, getFoldersUrl(), mSession);
        return request;
    }
284986
@CacheResult
  @Override
  public DOAuth2User get(@CacheKey Object parentKey, @CacheKey java.lang.Long id) throws IOException {
    return super.get(parentKey, id);
  }
1323305
public BoxRequestsFolder.GetCollaborations getCollaborationsRequest(String id) {
        BoxRequestsFolder.GetCollaborations request = new BoxRequestsFolder.GetCollaborations(id, getFolderCollaborationsUrl(id), mSession);
        return request;
    }
1235594
public function getParent($parentId)
    {
        if ($parentId && isset($this->site->pages[$parentId])) {
            return $this->site->pages[$parentId];
        }

        return [];
    }
1183839
def copy_page_and_children(self, foreign_id, parent_id, depth=0):
        '''
        
        '''
        url = "{}/api/v2/pages/{}/".format(self.base_url, foreign_id)

        self.log(ACTION, "Requesting Data", {"url": url}, depth)
        try:
            # TODO: create a robust wrapper around this functionality
            response = requests.get(url)
            content = json.loads(response.content)
        except Exception as e:
            self.log(ERROR, "Requesting Data - abandoning copy",
                     {"url": url, "exception": e}, depth)
            return None

        parent = Page.objects.get(id=parent_id).specific
        page = None
        try:
            self.log(ACTION, "Create Page", {"url": url}, depth)
            page = self.attach_page(parent, content)
            if page:
                self.log(SUCCESS, "Create Page",
                         {"url": url,
                          "page title": page.title.encode('utf-8')},
                         depth)
        except PageNotImportable as e:
            message = e.message.pop("message")
            self.log(WARNING, message, e.message.pop("message"), depth)
            return None

        if page:
            # create translations
            if content["meta"]["translations"]:
                for translation_obj in content["meta"]["translations"]:
                    _url = "{}/api/v2/pages/{}/".format(self.base_url,
                                                        translation_obj["id"])
                    # TODO: create a robust wrapper around this functionality
                    _response = requests.get(_url)
                    self.log(
                        ACTION,
                        "Getting translated content",
                        {"url": _url}, depth)
                    if _response.content:
                        _content = json.loads(_response.content)

                        if ("locale" in translation_obj and
                                translation_obj["locale"]):
                            self.attach_translated_content(
                                page, _content, translation_obj["locale"])
                        else:
                            self.log(
                                ERROR,
                                "locale is null",
                                {"url": _url, }, depth)
                    else:
                        self.log(
                            ERROR,
                            "Getting translated content",
                            {"url": _url}, depth)

            main_language_child_ids = content["meta"]["main_language_children"]

            # recursively iterate through child nodes
            if main_language_child_ids:
                for main_language_child_id in main_language_child_ids:
                    try:
                        self.copy_page_and_children(
                            foreign_id=main_language_child_id,
                            parent_id=page.id, depth=depth + 1)
                    except Exception as e:
                        self.log(ERROR, "Copying Children",
                                 {"url": url, "exception": e})
111815
def get_bookmark(self, bookmark_id):
        
        url = self._generate_url('bookmarks/{0}'.format(bookmark_id))
        return self.get(url)
110856
public BoxRequestsBookmark.UpdateSharedBookmark getCreateSharedLinkRequest(String id) {
        BoxRequestsBookmark.UpdateSharedBookmark request = new BoxRequestsBookmark.UpdateSharedBookmark(id, getBookmarkInfoUrl(id), mSession)
                .setAccess(null);
        return request;
    }