Set line_str.

        Line_str is only writeable if LogEvent was created from a string,
        not from a system.profile documents.

def set_line_str(self, line_str):
        """
        Set line_str.

        Line_str is only writeable if LogEvent was created from a string,
        not from a system.profile documents.
        """
        if not self.from_string:
            raise ValueError("can't set line_str for LogEvent created from "
                             "system.profile documents.")

        if line_str != self._line_str:
            self._line_str = line_str.rstrip()
            self._reset()