{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tubearchivist/json-schema/tubearchivist-video-stats-schema.json",
  "title": "VideoStats",
  "description": "serialize video stats",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tubearchivist-stats-api-openapi.yml#/components/schemas/VideoStats",
  "type": "object",
  "properties": {
    "doc_count": {
      "type": "integer"
    },
    "media_size": {
      "type": "integer"
    },
    "duration": {
      "type": "integer"
    },
    "duration_str": {
      "type": "string"
    },
    "type_videos": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoStatsItem"
        }
      ]
    },
    "type_shorts": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoStatsItem"
        }
      ]
    },
    "type_streams": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoStatsItem"
        }
      ]
    },
    "active_true": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoStatsItem"
        }
      ]
    },
    "active_false": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoStatsItem"
        }
      ]
    }
  },
  "required": [
    "active_false",
    "active_true",
    "doc_count",
    "duration",
    "duration_str",
    "media_size",
    "type_shorts",
    "type_streams",
    "type_videos"
  ],
  "$defs": {
    "VideoStatsItem": {
      "type": "object",
      "description": "serialize video stats item",
      "properties": {
        "doc_count": {
          "type": "integer"
        },
        "media_size": {
          "type": "integer"
        },
        "duration": {
          "type": "integer"
        },
        "duration_str": {
          "type": "string"
        }
      },
      "required": [
        "doc_count",
        "duration",
        "duration_str",
        "media_size"
      ]
    }
  }
}