Initialize properties of the appropriate struct class from this model class.

def to_struct(self):
        """
        Initialize properties of the appropriate struct class from this model class.
        """
        structobj = self.struct_type()
        for k in structobj.attributes():
            self.log.info("Setting attribute %s to %r" % (k, getattr(self, k)))
            setattr(structobj, k, getattr(self, k))
        return structobj