{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://interchange.stellarview.net/schemas/video_source.schema.json",
  "title": "A video capture posted to the Collector: the meta part of a multipart upload beside the file",
  "type": "object",
  "required": ["capture_id", "source_kind", "device", "starts_at", "ends_at", "placement"],
  "additionalProperties": false,
  "properties": {
    "capture_id": { "$ref": "common.schema.json#/$defs/uuid", "description": "Becomes the sortie_id of MissionSight's segment.stored: one capture, one sortie." },
    "source_kind": { "enum": ["camera", "drone", "phone_walk", "video_system"] },
    "device": { "type": "string" },
    "starts_at": { "$ref": "common.schema.json#/$defs/time" },
    "ends_at": { "$ref": "common.schema.json#/$defs/time" },
    "placement": {
      "description": "Where the capture sits against the model: an asset or a room, or not_placed.",
      "oneOf": [
        { "const": "not_placed" },
        {
          "type": "object",
          "required": ["asset_id"],
          "additionalProperties": false,
          "properties": { "asset_id": { "type": "string" }, "basis": { "enum": ["loaded", "read", "generated", "guessed"] } }
        }
      ]
    },
    "profile": { "type": "string", "description": "The LDS profile its marks are made under (sortie, walk)." }
  }
}
