def as_thing_description(self):
thing = {<EOL>'<STR_LIT:name>': self.name,<EOL>'<STR_LIT>': self.href_prefix if self.href_prefix else '<STR_LIT:/>',<EOL>'<STR_LIT>': self.context,<EOL>'<STR_LIT>': self.type,<EOL>'<STR_LIT>': self.get_property_descriptions(),<EOL>'<STR_LIT>': {},<EOL>'<STR_LIT>': {},<EOL>'<STR_LIT>': [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(self.href_prefix),<EOL>},<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(self.href_prefix),<EOL>},<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(self.href_prefix),<EOL>},<EOL>],<EOL>}<EOL>for name, action in self.available_actions.items():<EOL><INDENT>thing['<STR_LIT>'][name] = action['<STR_LIT>']<EOL>thing['<STR_LIT>'][name]['<STR_LIT>'] = [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT:action>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(self.href_prefix, name),<EOL>},<EOL>]<EOL><DEDENT>for name, event in self.available_events.items():<EOL><INDENT>thing['<STR_LIT>'][name] = event['<STR_LIT>']<EOL>thing['<STR_LIT>'][name]['<STR_LIT>'] = [<EOL>{<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(self.href_prefix, name),<EOL>},<EOL>]<EOL><DEDENT>if self.ui_href is not None:<EOL><INDENT>thing['<STR_LIT>'].append({<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': self.ui_href,<EOL>})<EOL><DEDENT>if self.description:<EOL><INDENT>thing['<STR_LIT:description>'] = self.description<EOL><DEDENT>return thing<EOL>
Return the thing state as a Thing Description.

Returns the state as a dictionary.