<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_dict(self):
 """ Generate a dictionary of the contents of this DutInformation object. :return: dict """

        my_info = {}
        if self.platform:
            my_info["model"] = self.platform
        if self.resource_id:
            my_info["sn"] = self.resource_id
        if self.vendor:
            my_info["vendor"] = self.vendor
        if self.provider:
            my_info["provider"] = self.provider
        return my_info