Gets a request that copies a folder

@param id        id of folder to copy
@param parentId  id of parent folder to copy folder into
@return      request to copy a folder
183675
public BoxRequestsFolder.CopyFolder getCopyRequest(String id, String parentId) {
        BoxRequestsFolder.CopyFolder request = new BoxRequestsFolder.CopyFolder(id, parentId, getFolderCopyUrl(id), mSession);
        return request;
    }
612444
public BoxRequestsFile.DeleteFileVersion getDeleteVersionRequest(String id, String versionId) {
        BoxRequestsFile.DeleteFileVersion request = new BoxRequestsFile.DeleteFileVersion(versionId, getDeleteFileVersionUrl(id, versionId), mSession);
        return request;
    }
587623
public function loadUrlWildcardData($parentId)
    {
        try {
            return $this->innerGateway->loadUrlWildcardData($parentId);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
1219967
def get_parent_dept_path(self):
        """"""
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return self.json_response.get("parentIds", None)
606113
@RequestMapping(value = "branches/{branchId}/copy", method = RequestMethod.PUT)
    public Branch copy(@PathVariable ID branchId, @RequestBody BranchCopyRequest request) {
        // Gets the branch
        Branch branch = structureService.getBranch(branchId);
        // Performs the copy
        return copyService.copy(branch, request);
    }
366646
public function update($parentId, $id, array $data)
    {
        $resource = $this->createPartialResourceUrlForView($parentId, $id);
        $data = $this->client->put($resource, [$this->getResourceName() => $data]);

        return $this->fromArray(reset($data));
    }
284986
@CacheResult
  @Override
  public DOAuth2User get(@CacheKey Object parentKey, @CacheKey java.lang.Long id) throws IOException {
    return super.get(parentKey, id);
  }
623640
public BoxRequestsFolder.GetFolderItems getItemsRequest(String id) {
        BoxRequestsFolder.GetFolderItems request = new BoxRequestsFolder.GetFolderItems(id, getFolderItemsUrl(id), mSession);
        return request;
    }
552944
@Override
    public Node getParentNode(String parentNodeId)
    {
        NodeLink link = new NodeLink(parentNodeId, getNodeId());

        if (this.parents == null)
        {
            return null;
        }
        else
        {
            return this.parents.get(link);
        }
    }
218822
public BoxFolder.Info restoreFolder(String folderID) {
        URL url = RESTORE_FOLDER_URL_TEMPLATE.build(this.api.getBaseURL(), folderID);
        BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST");
        JsonObject requestJSON = new JsonObject()
                .add("", "");
        request.setBody(requestJSON.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject responseJSON = JsonObject.readFrom(response.getJSON());

        BoxFolder restoredFolder = new BoxFolder(this.api, responseJSON.get("id").asString());
        return restoredFolder.new Info(responseJSON);
    }
801661
def copy_to_folder(self, parent, name=None, api=None):
        
        api = api or self._API

        if self.is_folder():
            raise SbgError('Copying folders is not supported')

        data = {
            'parent': Transform.to_file(parent)
        }

        if name:
            data['name'] = name

        response = api.post(
            url=self._URL['copy_to_folder'].format(file_id=self.id),
            data=data
        ).json()
        return File(api=api, **response)
531732
public static String parentResourceIdFromResourceId(String id) {
        if (id == null) {
            return null;
        }
        ResourceId resourceId = ResourceId.fromString(id);
        if (resourceId != null && resourceId.parent() != null) {
            return ResourceId.fromString(id).parent().id();
        }

        return null;
    }
475454
public static MutableInodeDirectory create(long id, long parentId, String name,
      CreateDirectoryContext context) {
    return new MutableInodeDirectory(id)
        .setParentId(parentId)
        .setName(name)
        .setTtl(context.getTtl())
        .setTtlAction(context.getTtlAction())
        .setOwner(context.getOwner())
        .setGroup(context.getGroup())
        .setMode(context.getMode().toShort())
        .setAcl(context.getAcl())
        // SetAcl call is also setting default AclEntries
        .setAcl(context.getDefaultAcl())
        .setMountPoint(context.isMountPoint());
  }
1223760
public function cgetAction(Request $request, $parentId)
    {
        if ($request->get('flat') == 'true') {
            /** @var RestHelperInterface $restHelper */
            $restHelper = $this->get('sulu_core.doctrine_rest_helper');

            /** @var DoctrineListBuilderFactory $factory */
            $factory = $this->get('sulu_core.doctrine_list_builder_factory');

            $listBuilder = $factory->create(self::$entityName);

            $fieldDescriptors = $this->getProductVariantManager()->retrieveFieldDescriptors($this->getLocale($request));

            $restHelper->initializeListBuilder(
                $listBuilder,
                $fieldDescriptors
            );

            $listBuilder->where($fieldDescriptors['parent'], $parentId);
            $listBuilder->addGroupBy($fieldDescriptors['id']);

            // Only add group by id if categories are processed.
            $fieldsParam = $request->get('fields');
            $fields = explode(',', $fieldsParam);
            if (isset($filter['categories'])
                || !$fieldsParam
                || array_search('categories', $fields) !== false
            ) {
                $listBuilder->addGroupBy($fieldDescriptors['id']);
            }

            $list = new ListRepresentation(
                $listBuilder->execute(),
                self::$entityKey,
                'get_product_variants',
                array_merge(
                    $request->query->all(),
                    [
                        'parentId' => $parentId,
                    ]
                ),
                $listBuilder->getCurrentPage(),
                $listBuilder->getLimit(),
                $listBuilder->count()
            );
        } else {
            $list = new CollectionRepresentation(
                $this->getProductManager()->findAllByLocale($this->getLocale($request)),
                self::$entityKey
            );
        }

        $view = $this->view($list, 200);

        return $this->handleView($view);
    }
1087426
private File fileForItem(String id) {
		File subDir = subDirForId(id);
		String fileName = id.substring(SUBDIR_POLICY);
		return new File(subDir, fileName);
	}
751649
public GetIndividualProfilesRequest withIndividualId(final int id) {
        this.id = id;
        this.password = new char[0];
        this.login = this.accountNumber = this.routingNumber = null;
        return this;
    }
1349815
public BoxRequestsFile.GetFileVersions getVersionsRequest(String id) {
        BoxRequestsFile.GetFileVersions request = new BoxRequestsFile.GetFileVersions(id, getFileVersionsUrl(id), mSession);
        return request;
    }