def __init__(self, *, parent=None, con=None, **kwargs):
if parent and con:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.con = parent.con if parent else con<EOL>main_resource = kwargs.pop('<STR_LIT>', None) or (<EOL>getattr(parent, '<STR_LIT>', None) if parent else None)<EOL>super().__init__(<EOL>protocol=parent.protocol if parent else kwargs.get('<STR_LIT>'),<EOL>main_resource=main_resource,<EOL>attachment_name_property='<STR_LIT>', attachment_type='<STR_LIT>')<EOL>download_attachments = kwargs.get('<STR_LIT>')<EOL>cloud_data = kwargs.get(self._cloud_data_key, {})<EOL>cc = self._cc  <EOL>self._track_changes = TrackerSet(casing=cc)<EOL>self.object_id = cloud_data.get(cc('<STR_LIT:id>'), kwargs.get('<STR_LIT>', None))<EOL>self.__created = cloud_data.get(cc('<STR_LIT>'), None)<EOL>self.__modified = cloud_data.get(cc('<STR_LIT>'), None)<EOL>self.__received = cloud_data.get(cc('<STR_LIT>'), None)<EOL>self.__sent = cloud_data.get(cc('<STR_LIT>'), None)<EOL>local_tz = self.protocol.timezone<EOL>self.__created = parse(self.__created).astimezone(<EOL>local_tz) if self.__created else None<EOL>self.__modified = parse(self.__modified).astimezone(<EOL>local_tz) if self.__modified else None<EOL>self.__received = parse(self.__received).astimezone(<EOL>local_tz) if self.__received else None<EOL>self.__sent = parse(self.__sent).astimezone(<EOL>local_tz) if self.__sent else None<EOL>self.__attachments = MessageAttachments(parent=self, attachments=[])<EOL>self.has_attachments = cloud_data.get(cc('<STR_LIT>'), <NUM_LIT:0>)<EOL>if self.has_attachments and download_attachments:<EOL><INDENT>self.attachments.download_attachments()<EOL><DEDENT>self.__subject = cloud_data.get(cc('<STR_LIT>'), '<STR_LIT>')<EOL>body = cloud_data.get(cc('<STR_LIT:body>'), {})<EOL>self.__body = body.get(cc('<STR_LIT:content>'), '<STR_LIT>')<EOL>self.body_type = body.get(cc('<STR_LIT>'),<EOL>'<STR_LIT>')  <EOL>self.__sender = self._recipient_from_cloud(<EOL>cloud_data.get(cc('<STR_LIT>'), None), field=cc('<STR_LIT>'))<EOL>self.__to = self._recipients_from_cloud(<EOL>cloud_data.get(cc('<STR_LIT>'), []), field=cc('<STR_LIT>'))<EOL>self.__cc = self._recipients_from_cloud(<EOL>cloud_data.get(cc('<STR_LIT>'), []), field=cc('<STR_LIT>'))<EOL>self.__bcc = self._recipients_from_cloud(<EOL>cloud_data.get(cc('<STR_LIT>'), []), field=cc('<STR_LIT>'))<EOL>self.__reply_to = self._recipients_from_cloud(<EOL>cloud_data.get(cc('<STR_LIT>'), []), field=cc('<STR_LIT>'))<EOL>self.__categories = cloud_data.get(cc('<STR_LIT>'), [])<EOL>self.__importance = ImportanceLevel.from_value(cloud_data.get(cc('<STR_LIT>'), '<STR_LIT>') or '<STR_LIT>')<EOL>self.__is_read = cloud_data.get(cc('<STR_LIT>'), None)<EOL>self.__is_read_receipt_requested = cloud_data.get(cc('<STR_LIT>'), False)<EOL>self.__is_delivery_receipt_requested = cloud_data.get(cc('<STR_LIT>'), False)<EOL>meeting_mt = cloud_data.get(cc('<STR_LIT>'), '<STR_LIT:none>')<EOL>meeting_mt = meeting_mt.replace('<STR_LIT>', '<STR_LIT>')<EOL>self.__meeting_message_type = MeetingMessageType.from_value(meeting_mt) if meeting_mt != '<STR_LIT:none>' else None<EOL>self.__is_draft = cloud_data.get(cc('<STR_LIT>'), kwargs.get('<STR_LIT>',<EOL>True))<EOL>self.conversation_id = cloud_data.get(cc('<STR_LIT>'), None)<EOL>self.folder_id = cloud_data.get(cc('<STR_LIT>'), None)<EOL>flag_data = cloud_data.get(cc('<STR_LIT>'), {})<EOL>self.__flag = MessageFlag(parent=self, flag_data=flag_data)<EOL>self.internet_message_id = cloud_data.get(cc('<STR_LIT>'), '<STR_LIT>')<EOL>self.web_link = cloud_data.get(cc('<STR_LIT>'), '<STR_LIT>')<EOL>self.message_headers = cloud_data.get(cc('<STR_LIT>'), [])<EOL>
Makes a new message wrapper for sending and receiving messages.

        :param parent: parent folder/account to create the message in
        :type parent: mailbox.Folder or Account
        :param Connection con: connection to use if no parent specified
        :param Protocol protocol: protocol to use if no parent specified
         (kwargs)
        :param str main_resource: use this resource instead of parent resource
         (kwargs)
        :param bool download_attachments: whether or not to
         download attachments (kwargs)