def get_message(self, object_id=None, query=None, *, download_attachments=False):
if object_id is not None and query is not None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if object_id is not None:<EOL><INDENT>url = self.build_url(self._endpoints.get('<STR_LIT:message>').format(id=object_id))<EOL>response = self.con.get(url)<EOL>if not response:<EOL><INDENT>return None<EOL><DEDENT>message = response.json()<EOL>return self.message_constructor(parent=self,<EOL>download_attachments=download_attachments,<EOL>**{self._cloud_data_key: message})<EOL><DEDENT>else:<EOL><INDENT>messages = list(self.get_messages(limit=<NUM_LIT:1>, query=query,<EOL>download_attachments=download_attachments))<EOL>return messages[<NUM_LIT:0>] if messages else None<EOL><DEDENT>
Get one message from the query result.
         A shortcut to get_messages with limit=1
        :param object_id: the message id to be retrieved.
        :param query: applies a filter to the request such as
         "displayName eq 'HelloFolder'"
        :type query: Query or str
        :param bool download_attachments: whether or not to download attachments
        :return: one Message
        :rtype: Message or None