def move(self, folder):
if self.object_id is None:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.object_id))<EOL>if isinstance(folder, str):<EOL><INDENT>folder_id = folder<EOL><DEDENT>else:<EOL><INDENT>folder_id = getattr(folder, '<STR_LIT>', None)<EOL><DEDENT>if not folder_id:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>data = {self._cc('<STR_LIT>'): folder_id}<EOL>response = self.con.post(url, data=data)<EOL>if not response:<EOL><INDENT>return False<EOL><DEDENT>self.folder_id = folder_id<EOL>return True<EOL>
Move the message to a given folder

        :param folder: Folder object or Folder id or Well-known name to
         move this message to
        :type folder: str or mailbox.Folder
        :return: Success / Failure
        :rtype: bool