{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://standards.msadsnetwork.com/downloads/schemas/lap-bid.schema.json",
  "title": "Lite Ad Profile v0.1 — bid.ext.lite",
  "type": "object",
  "required": [
    "ver",
    "level",
    "initial_kb",
    "total_kb",
    "requests",
    "autoplay",
    "measured_by"
  ],
  "additionalProperties": false,
  "properties": {
    "ver": {
      "const": "0.1"
    },
    "level": {
      "enum": [
        1,
        2,
        3
      ]
    },
    "initial_kb": {
      "type": "number",
      "minimum": 0
    },
    "total_kb": {
      "type": "number",
      "minimum": 0
    },
    "requests": {
      "type": "integer",
      "minimum": 1
    },
    "autoplay": {
      "const": false
    },
    "measured_by": {
      "enum": [
        "self",
        "exchange",
        "third_party"
      ]
    },
    "measured_at": {
      "type": "string",
      "format": "date"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "level": {
            "const": 1
          }
        }
      },
      "then": {
        "properties": {
          "initial_kb": {
            "maximum": 30
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "level": {
            "const": 2
          }
        }
      },
      "then": {
        "properties": {
          "initial_kb": {
            "maximum": 100
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "level": {
            "const": 3
          }
        }
      },
      "then": {
        "properties": {
          "initial_kb": {
            "maximum": 300
          }
        }
      }
    }
  ]
}