"""UpdateService firmware inventory (``UpdateService/FirmwareInventory/*``).""" from __future__ import annotations from collections.abc import Mapping from typing import Any from .common import boolean, link_list, status, text def parse_firmware(item: Mapping[str, Any]) -> dict[str, Any]: """One SoftwareInventory member: what it is, its version, whether it can be updated.""" state, health = status(item) return { "id": text(item.get("Id")), "name": text(item.get("Name")), "version": text(item.get("Version")), "updateable": boolean(item.get("Updateable")), "manufacturer": text(item.get("Manufacturer")), "release_date": text(item.get("ReleaseDate")), "state": state, "health": health, "related": link_list(item, "RelatedItem"), }