def get_event(self):
if not self.is_event_message:<EOL><INDENT>return None<EOL><DEDENT>query = self.q().select('<STR_LIT>').expand('<STR_LIT>')<EOL>url = self.build_url(self._endpoints.get('<STR_LIT>').format(id=self.object_id))<EOL>response = self.con.get(url, params=query.as_params())<EOL>if not response:<EOL><INDENT>return None<EOL><DEDENT>data = response.json()<EOL>event_data = data.get(self._cc('<STR_LIT>'))<EOL>return Event(parent=self, **{self._cloud_data_key: event_data})<EOL>
If this is a EventMessage it should return the related Event