{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "datai physical activity clip analysis v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["description", "environment", "viewpoint", "objects", "tools", "actions", "quality", "privacy", "uncertainties"],
  "properties": {
    "description": {"type": "string", "minLength": 10, "maxLength": 2000},
    "environment": {"type": "string", "minLength": 2, "maxLength": 300},
    "viewpoint": {"type": "string", "enum": ["head_mounted", "chest_mounted", "handheld", "fixed", "unknown"]},
    "objects": {"type": "array", "maxItems": 40, "items": {"type": "string", "minLength": 1, "maxLength": 80}},
    "tools": {"type": "array", "maxItems": 40, "items": {"type": "string", "minLength": 1, "maxLength": 80}},
    "actions": {
      "type": "array", "maxItems": 64,
      "items": {
        "type": "object", "additionalProperties": false,
        "required": ["start_ms", "end_ms", "verb", "object", "goal", "success", "note"],
        "properties": {
          "start_ms": {"type": "integer", "minimum": 0, "maximum": 60000},
          "end_ms": {"type": "integer", "minimum": 1, "maximum": 60000},
          "verb": {"type": "string", "minLength": 1, "maxLength": 80},
          "object": {"type": "string", "minLength": 1, "maxLength": 120},
          "goal": {"type": "string", "maxLength": 300},
          "success": {"type": "string", "enum": ["success", "failure", "uncertain"]},
          "note": {"type": "string", "maxLength": 1000}
        }
      }
    },
    "quality": {
      "type": "object", "additionalProperties": false,
      "required": ["usable", "task_visible", "major_occlusion", "blur"],
      "properties": {
        "usable": {"type": "boolean"}, "task_visible": {"type": "boolean"},
        "major_occlusion": {"type": "boolean"},
        "blur": {"type": "string", "enum": ["low", "moderate", "high"]}
      }
    },
    "privacy": {
      "type": "object", "additionalProperties": false,
      "required": ["identifiable_people", "sensitive_information"],
      "properties": {
        "identifiable_people": {"type": "string", "enum": ["none", "present", "uncertain"]},
        "sensitive_information": {"type": "string", "enum": ["none", "present", "uncertain"]}
      }
    },
    "uncertainties": {"type": "array", "maxItems": 20, "items": {"type": "string", "minLength": 1, "maxLength": 300}}
  }
}
