{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:nvidia:locate-anything-data:schema:media-source-map:v1", "title": "LocateAnything public media source mapping row", "type": "object", "additionalProperties": false, "required": [ "schema", "pool_id", "source_id", "source_dataset", "source_snapshot_id", "source_media_name", "source_relative_path", "source_bytes", "source_sha256", "identity_status", "member_name", "content_sha256", "media_kind", "encoding", "encoded_bytes", "availability" ], "properties": { "schema": { "const": "locate-anything.public-media-source-map/v1" }, "pool_id": { "type": "string", "minLength": 1 }, "source_id": { "type": "integer", "minimum": 0, "description": "Pool-local stable source alias identifier." }, "source_dataset": { "type": "string", "minLength": 1 }, "source_snapshot_id": { "type": "string", "minLength": 1, "description": "Content snapshot or source-manifest identity used by the conversion campaign; this is not an upstream release name." }, "source_media_name": { "type": "string", "minLength": 1, "description": "Original source image name, never an LMDB or packed key." }, "source_relative_path": { "type": "string", "minLength": 1, "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$" }, "source_bytes": { "type": "integer", "minimum": 0 }, "source_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "identity_status": { "type": "string", "minLength": 1 }, "member_name": { "type": "string", "pattern": "^m/[0-9]{12}\\.[A-Za-z0-9]+$" }, "content_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "media_kind": { "type": "string", "enum": [ "image", "video", "audio", "depth", "tensor", "document" ] }, "encoding": { "type": "string", "minLength": 1 }, "encoded_bytes": { "type": "integer", "minimum": 0 }, "availability": { "type": "string", "enum": [ "hosted", "upstream_download_required" ] }, "tar_relpath": { "type": [ "string", "null" ], "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$" }, "payload_offset": { "type": [ "integer", "null" ], "minimum": 0 }, "payload_length": { "type": [ "integer", "null" ], "minimum": 0 } }, "allOf": [ { "if": { "properties": { "availability": { "const": "hosted" } }, "required": [ "availability" ] }, "then": { "required": [ "tar_relpath", "payload_offset", "payload_length" ], "properties": { "tar_relpath": { "type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$" }, "payload_offset": { "type": "integer", "minimum": 0 }, "payload_length": { "type": "integer", "minimum": 0 } } }, "else": { "required": [ "tar_relpath", "payload_offset", "payload_length" ], "properties": { "tar_relpath": { "type": "null" }, "payload_offset": { "type": "null" }, "payload_length": { "type": "null" } } } } ] }