def METHOD_NAME(self) -> Dict[str, Union[str, bool]]:
    module_json: Dict[str, Union[str, bool]] = {
        "repo_name": self.repo_name,
        "module_name": self.name,
        "commit": self.commit,
    }
    if self.type == InstallableType.COG:
        module_json["pinned"] = self.pinned
    return module_json