def METHOD_NAME(self):
    d = {"job_id": self._id,
         "type": self.type,
         "json": self._json}
    if self.type == "shell":
        d["command"] = self._what
    elif self.type == "module":
        d["module"] = self._what
    else:
        raise JobError("Unknown Job type %s" % self.type)
    return d