{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "AssetMap",
  "description": "ASSETMAP.xml — maps UUIDs to physical file paths (ST 429-9 §6).",
  "type": "object",
  "required": [
    "assetList",
    "id",
    "issueDate",
    "volumeCount"
  ],
  "properties": {
    "annotationText": {
      "type": [
        "string",
        "null"
      ]
    },
    "assetList": {
      "$ref": "#/definitions/AssetList"
    },
    "creator": {
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Unique identifier for this AssetMap (ST 429-9 §6.2).",
      "allOf": [
        {
          "$ref": "#/definitions/ImfUuid"
        }
      ]
    },
    "issueDate": {
      "description": "ISO 8601 issue date (e.g. `\"2016-10-06T08:35:02-00:00\"`).",
      "type": "string"
    },
    "issuer": {
      "type": [
        "string",
        "null"
      ]
    },
    "volumeCount": {
      "type": "integer",
      "format": "uint32",
      "minimum": 0.0
    }
  },
  "definitions": {
    "Asset": {
      "description": "A single asset entry in ASSETMAP.xml.",
      "type": "object",
      "required": [
        "chunkList",
        "id"
      ],
      "properties": {
        "chunkList": {
          "$ref": "#/definitions/ChunkList"
        },
        "id": {
          "description": "UUID identifying this asset.",
          "allOf": [
            {
              "$ref": "#/definitions/ImfUuid"
            }
          ]
        },
        "packingList": {
          "description": "Present and `true` when this entry refers to the Packing List file.",
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "AssetList": {
      "description": "The `<AssetList>` element in ASSETMAP.xml.",
      "type": "object",
      "required": [
        "assets"
      ],
      "properties": {
        "assets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Asset"
          }
        }
      }
    },
    "Chunk": {
      "description": "A single file path entry in a ChunkList.",
      "type": "object",
      "required": [
        "path",
        "volumeIndex"
      ],
      "properties": {
        "path": {
          "description": "File path relative to the IMP root directory.",
          "type": "string"
        },
        "volumeIndex": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0.0
        }
      }
    },
    "ChunkList": {
      "description": "A list of file chunks for a single asset.",
      "type": "object",
      "required": [
        "chunks"
      ],
      "properties": {
        "chunks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Chunk"
          }
        }
      }
    },
    "ImfUuid": {
      "description": "A SMPTE IMF UUID, serialised as a bare UUID string (e.g. \"0eb3d1b9-b77b-4d3f-bbe5-7c69b15dca85\")",
      "type": "string",
      "format": "uuid"
    }
  }
}