def move(self, target):
if isinstance(target, Folder):<EOL><INDENT>target_id = target.object_id<EOL><DEDENT>elif isinstance(target, Drive):<EOL><INDENT>root_folder = target.get_root_folder()<EOL>if not root_folder:<EOL><INDENT>return False<EOL><DEDENT>target_id = root_folder.object_id<EOL><DEDENT>elif isinstance(target, str):<EOL><INDENT>target_id = target<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if not self.object_id or not target_id:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>')<EOL><DEDENT>if target_id == '<STR_LIT:root>':<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.object_id))<EOL>data = {'<STR_LIT>': {'<STR_LIT:id>': target_id}}<EOL>response = self.con.patch(url, data=data)<EOL>if not response:<EOL><INDENT>return False<EOL><DEDENT>self.parent_id = target_id<EOL>return True<EOL>
Moves this DriveItem to another Folder.
        Can't move between different Drives.

        :param target: a Folder, Drive item or Item Id string.
         If it's a drive the item will be moved to the root folder.
        :type target: drive.Folder or DriveItem or str
        :return: Success / Failure
        :rtype: bool