{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://abdess.github.io/retrobios/api/v1/schemas/install-events.schema.json",
  "title": "RetroBIOS installer event",
  "description": "One line of install.py --events, event schema 1. Written from EVENT_KEYS in install.py by scripts/generate_event_schema.py. The schema gains kinds, never keys on an existing kind: a reader skips a kind it does not know.",
  "type": "object",
  "required": [
    "event"
  ],
  "properties": {
    "event": {
      "enum": [
        "start",
        "unsearched",
        "detect",
        "error",
        "no_space",
        "scanned",
        "version",
        "board",
        "unknown_core",
        "choices",
        "set_aside",
        "file",
        "system",
        "checking",
        "games_reading",
        "games",
        "games_unavailable",
        "check",
        "declared",
        "data",
        "space",
        "fetch_plan",
        "found",
        "unreadable",
        "saves",
        "unplaced",
        "download",
        "progress",
        "transfer",
        "downloaded",
        "failures",
        "summary",
        "app",
        "record",
        "removal_plan",
        "removed",
        "restored",
        "restore",
        "backup",
        "pack",
        "end"
      ]
    }
  },
  "oneOf": [
    {
      "$ref": "#/$defs/start"
    },
    {
      "$ref": "#/$defs/unsearched"
    },
    {
      "$ref": "#/$defs/detect"
    },
    {
      "$ref": "#/$defs/error"
    },
    {
      "$ref": "#/$defs/no_space"
    },
    {
      "$ref": "#/$defs/scanned"
    },
    {
      "$ref": "#/$defs/version"
    },
    {
      "$ref": "#/$defs/board"
    },
    {
      "$ref": "#/$defs/unknown_core"
    },
    {
      "$ref": "#/$defs/choices"
    },
    {
      "$ref": "#/$defs/set_aside"
    },
    {
      "$ref": "#/$defs/file"
    },
    {
      "$ref": "#/$defs/system"
    },
    {
      "$ref": "#/$defs/checking"
    },
    {
      "$ref": "#/$defs/games_reading"
    },
    {
      "$ref": "#/$defs/games"
    },
    {
      "$ref": "#/$defs/games_unavailable"
    },
    {
      "$ref": "#/$defs/check"
    },
    {
      "$ref": "#/$defs/declared"
    },
    {
      "$ref": "#/$defs/data"
    },
    {
      "$ref": "#/$defs/space"
    },
    {
      "$ref": "#/$defs/fetch_plan"
    },
    {
      "$ref": "#/$defs/found"
    },
    {
      "$ref": "#/$defs/unreadable"
    },
    {
      "$ref": "#/$defs/saves"
    },
    {
      "$ref": "#/$defs/unplaced"
    },
    {
      "$ref": "#/$defs/download"
    },
    {
      "$ref": "#/$defs/progress"
    },
    {
      "$ref": "#/$defs/transfer"
    },
    {
      "$ref": "#/$defs/downloaded"
    },
    {
      "$ref": "#/$defs/failures"
    },
    {
      "$ref": "#/$defs/summary"
    },
    {
      "$ref": "#/$defs/app"
    },
    {
      "$ref": "#/$defs/record"
    },
    {
      "$ref": "#/$defs/removal_plan"
    },
    {
      "$ref": "#/$defs/removed"
    },
    {
      "$ref": "#/$defs/restored"
    },
    {
      "$ref": "#/$defs/restore"
    },
    {
      "$ref": "#/$defs/backup"
    },
    {
      "$ref": "#/$defs/pack"
    },
    {
      "$ref": "#/$defs/end"
    }
  ],
  "$defs": {
    "start": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "schema",
        "installer",
        "mode"
      ],
      "properties": {
        "event": {
          "const": "start"
        },
        "schema": {
          "const": 1
        },
        "installer": {
          "type": "string"
        },
        "mode": {
          "enum": [
            "install",
            "check",
            "dry-run",
            "list",
            "remove",
            "restore",
            "pack"
          ]
        }
      }
    },
    "unsearched": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "folder",
        "reason",
        "message"
      ],
      "properties": {
        "event": {
          "const": "unsearched"
        },
        "folder": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "detect": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "os",
        "os_name",
        "platforms"
      ],
      "properties": {
        "event": {
          "const": "detect"
        },
        "os": {
          "type": "string"
        },
        "os_name": {
          "type": "string"
        },
        "platforms": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "error": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "stage",
        "reason",
        "platform",
        "message"
      ],
      "properties": {
        "event": {
          "const": "error"
        },
        "stage": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "no_space": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "folder",
        "bytes_needed",
        "bytes_free"
      ],
      "properties": {
        "event": {
          "const": "no_space"
        },
        "platform": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "bytes_needed": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_free": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "scanned": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "folder",
        "files",
        "truncated",
        "other_drives"
      ],
      "properties": {
        "event": {
          "const": "scanned"
        },
        "folder": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "truncated": {
          "type": "boolean"
        },
        "other_drives": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "version": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "list_version",
        "installed_version",
        "message"
      ],
      "properties": {
        "event": {
          "const": "version"
        },
        "platform": {
          "type": "string"
        },
        "list_version": {
          "type": "string"
        },
        "installed_version": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "board": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "board",
        "applied",
        "message"
      ],
      "properties": {
        "event": {
          "const": "board"
        },
        "platform": {
          "type": "string"
        },
        "board": {
          "type": "string"
        },
        "applied": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "unknown_core": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "core",
        "info",
        "dests",
        "message"
      ],
      "properties": {
        "event": {
          "const": "unknown_core"
        },
        "platform": {
          "type": "string"
        },
        "core": {
          "type": "string"
        },
        "info": {
          "type": "boolean"
        },
        "dests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "message": {
          "type": "string"
        }
      }
    },
    "choices": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "systems"
      ],
      "properties": {
        "event": {
          "const": "choices"
        },
        "platform": {
          "type": "string"
        },
        "systems": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "set_aside": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "dests"
      ],
      "properties": {
        "event": {
          "const": "set_aside"
        },
        "platform": {
          "type": "string"
        },
        "dests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "file": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "dest",
        "systems",
        "size",
        "state"
      ],
      "properties": {
        "event": {
          "const": "file"
        },
        "platform": {
          "type": "string"
        },
        "dest": {
          "type": "string"
        },
        "systems": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "size": {
          "type": "integer",
          "minimum": 0
        },
        "state": {
          "enum": [
            "present",
            "wrong_hash",
            "missing"
          ]
        }
      }
    },
    "system": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "system",
        "name",
        "files",
        "present",
        "missing",
        "wrong_hash",
        "bytes_needed"
      ],
      "properties": {
        "event": {
          "const": "system"
        },
        "platform": {
          "type": "string"
        },
        "system": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "present": {
          "type": "integer",
          "minimum": 0
        },
        "missing": {
          "type": "integer",
          "minimum": 0
        },
        "wrong_hash": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_needed": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "checking": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "files_done",
        "files_total"
      ],
      "properties": {
        "event": {
          "const": "checking"
        },
        "files_done": {
          "type": "integer",
          "minimum": 0
        },
        "files_total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "games_reading": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "files_done",
        "files_total"
      ],
      "properties": {
        "event": {
          "const": "games_reading"
        },
        "files_done": {
          "type": "integer",
          "minimum": 0
        },
        "files_total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "games": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "folder",
        "games",
        "recognised",
        "found",
        "fallback",
        "not_games",
        "required_only"
      ],
      "properties": {
        "event": {
          "const": "games"
        },
        "platform": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "games": {
          "type": "integer",
          "minimum": 0
        },
        "recognised": {
          "type": "integer",
          "minimum": 0
        },
        "found": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "fallback": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "not_games": {
          "type": "integer",
          "minimum": 0
        },
        "required_only": {
          "type": "boolean"
        }
      }
    },
    "games_unavailable": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "reason",
        "message"
      ],
      "properties": {
        "event": {
          "const": "games_unavailable"
        },
        "platform": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "check": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "name",
        "bios_dir",
        "files",
        "present",
        "missing",
        "wrong_hash",
        "bytes_needed",
        "data_missing",
        "not_installable"
      ],
      "properties": {
        "event": {
          "const": "check"
        },
        "platform": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "bios_dir": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "present": {
          "type": "integer",
          "minimum": 0
        },
        "missing": {
          "type": "integer",
          "minimum": 0
        },
        "wrong_hash": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_needed": {
          "type": "integer",
          "minimum": 0
        },
        "data_missing": {
          "type": "integer",
          "minimum": 0
        },
        "not_installable": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "declared": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "files",
        "present",
        "missing",
        "wrong_hash",
        "bytes_needed",
        "dests"
      ],
      "properties": {
        "event": {
          "const": "declared"
        },
        "platform": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "present": {
          "type": "integer",
          "minimum": 0
        },
        "missing": {
          "type": "integer",
          "minimum": 0
        },
        "wrong_hash": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_needed": {
          "type": "integer",
          "minimum": 0
        },
        "dests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "data": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "files",
        "bytes"
      ],
      "properties": {
        "event": {
          "const": "data"
        },
        "platform": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "space": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "bytes"
      ],
      "properties": {
        "event": {
          "const": "space"
        },
        "platform": {
          "type": "string"
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "fetch_plan": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "files",
        "bytes",
        "copied",
        "lacking",
        "data_files",
        "data_bytes"
      ],
      "properties": {
        "event": {
          "const": "fetch_plan"
        },
        "platform": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "copied": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lacking": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "data_files": {
          "type": "integer",
          "minimum": 0
        },
        "data_bytes": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "found": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "dest",
        "folder",
        "path",
        "member",
        "reason"
      ],
      "properties": {
        "event": {
          "const": "found"
        },
        "platform": {
          "type": "string"
        },
        "dest": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "member": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "unreadable": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "folder",
        "path",
        "member",
        "reason"
      ],
      "properties": {
        "event": {
          "const": "unreadable"
        },
        "platform": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "member": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "saves": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "files",
        "folder"
      ],
      "properties": {
        "event": {
          "const": "saves"
        },
        "platform": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "folder": {
          "type": "string"
        }
      }
    },
    "unplaced": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "root",
        "why"
      ],
      "properties": {
        "event": {
          "const": "unplaced"
        },
        "platform": {
          "type": "string"
        },
        "root": {
          "enum": [
            "save",
            "roms",
            "configs",
            "emulators"
          ]
        },
        "why": {
          "type": "string"
        }
      }
    },
    "download": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "files",
        "bytes"
      ],
      "properties": {
        "event": {
          "const": "download"
        },
        "platform": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "progress": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "files_done",
        "files_total",
        "bytes_done",
        "bytes_total"
      ],
      "properties": {
        "event": {
          "const": "progress"
        },
        "files_done": {
          "type": "integer",
          "minimum": 0
        },
        "files_total": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_done": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "transfer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "bytes_local",
        "bytes_network"
      ],
      "properties": {
        "event": {
          "const": "transfer"
        },
        "bytes_local": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_network": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "downloaded": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "dest",
        "ok",
        "reason",
        "size",
        "files_done",
        "files_total",
        "bytes_done",
        "bytes_total"
      ],
      "properties": {
        "event": {
          "const": "downloaded"
        },
        "dest": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "minimum": 0
        },
        "files_done": {
          "type": "integer",
          "minimum": 0
        },
        "files_total": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_done": {
          "type": "integer",
          "minimum": 0
        },
        "bytes_total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "failures": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "failed"
      ],
      "properties": {
        "event": {
          "const": "failures"
        },
        "failed": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "mode",
        "installed",
        "up_to_date",
        "pending",
        "failed",
        "skipped",
        "left_out",
        "kept",
        "interrupted"
      ],
      "properties": {
        "event": {
          "const": "summary"
        },
        "mode": {
          "enum": [
            "install",
            "check",
            "dry-run",
            "list",
            "remove",
            "restore",
            "pack"
          ]
        },
        "installed": {
          "type": "integer",
          "minimum": 0
        },
        "up_to_date": {
          "type": "integer",
          "minimum": 0
        },
        "pending": {
          "type": "integer",
          "minimum": 0
        },
        "failed": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "skipped": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "left_out": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "interrupted": {
          "type": "boolean"
        }
      }
    },
    "app": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "system",
        "folder",
        "ok",
        "reason",
        "dests",
        "written",
        "kept"
      ],
      "properties": {
        "event": {
          "const": "app"
        },
        "system": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        },
        "dests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "written": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "record": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "folder",
        "path",
        "status",
        "choice",
        "date",
        "files",
        "message"
      ],
      "properties": {
        "event": {
          "const": "record"
        },
        "platform": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "status": {
          "enum": [
            "applied",
            "written",
            "unreadable",
            "not_written",
            "listed",
            "made",
            "deleted",
            "not_deleted",
            "planned",
            "failed",
            "not_backup",
            "empty",
            "done",
            "not_done"
          ]
        },
        "choice": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "date": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "message": {
          "type": "string"
        }
      }
    },
    "removal_plan": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "folder",
        "files",
        "bytes",
        "systems",
        "dests",
        "kept",
        "gone",
        "backup",
        "message"
      ],
      "properties": {
        "event": {
          "const": "removal_plan"
        },
        "platform": {
          "type": "string"
        },
        "folder": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "systems": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dests": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "gone": {
          "type": "integer",
          "minimum": 0
        },
        "backup": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "removed": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "dest",
        "size",
        "ok",
        "reason",
        "moved_to"
      ],
      "properties": {
        "event": {
          "const": "removed"
        },
        "platform": {
          "type": "string"
        },
        "dest": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "minimum": 0
        },
        "ok": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        },
        "moved_to": {
          "type": "string"
        }
      }
    },
    "restored": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "folder",
        "path",
        "size",
        "ok",
        "reason"
      ],
      "properties": {
        "event": {
          "const": "restored"
        },
        "folder": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "minimum": 0
        },
        "ok": {
          "type": "boolean"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    "restore": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "folder",
        "status",
        "files",
        "bytes",
        "kept",
        "problem",
        "message"
      ],
      "properties": {
        "event": {
          "const": "restore"
        },
        "folder": {
          "type": "string"
        },
        "status": {
          "enum": [
            "applied",
            "written",
            "unreadable",
            "not_written",
            "listed",
            "made",
            "deleted",
            "not_deleted",
            "planned",
            "failed",
            "not_backup",
            "empty",
            "done",
            "not_done"
          ]
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "kept": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "problem": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "backup": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "folder",
        "date",
        "files",
        "bytes",
        "source",
        "status",
        "message"
      ],
      "properties": {
        "event": {
          "const": "backup"
        },
        "folder": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "source": {
          "enum": [
            "remove",
            "install"
          ]
        },
        "status": {
          "enum": [
            "applied",
            "written",
            "unreadable",
            "not_written",
            "listed",
            "made",
            "deleted",
            "not_deleted",
            "planned",
            "failed",
            "not_backup",
            "empty",
            "done",
            "not_done"
          ]
        },
        "message": {
          "type": "string"
        }
      }
    },
    "pack": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "platform",
        "path",
        "files",
        "bytes",
        "size",
        "parts",
        "status",
        "message"
      ],
      "properties": {
        "event": {
          "const": "pack"
        },
        "platform": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "files": {
          "type": "integer",
          "minimum": 0
        },
        "bytes": {
          "type": "integer",
          "minimum": 0
        },
        "size": {
          "type": "integer",
          "minimum": 0
        },
        "parts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "enum": [
            "applied",
            "written",
            "unreadable",
            "not_written",
            "listed",
            "made",
            "deleted",
            "not_deleted",
            "planned",
            "failed",
            "not_backup",
            "empty",
            "done",
            "not_done"
          ]
        },
        "message": {
          "type": "string"
        }
      }
    },
    "end": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event",
        "code"
      ],
      "properties": {
        "event": {
          "const": "end"
        },
        "code": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}
