{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-content-plan-response-schema.json",
  "title": "ContentPlanResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-content-api-openapi.yml#/components/schemas/ContentPlanResponse",
  "type": "object",
  "required": [
    "plan_id",
    "expires_at",
    "missing",
    "entries"
  ],
  "properties": {
    "plan_id": {
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "missing": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "sha256",
          "mode",
          "parts",
          "part_size_bytes",
          "part_count",
          "upload_id",
          "staging_key",
          "expires_at"
        ],
        "properties": {
          "sha256": {
            "$ref": "#/$defs/HexSha256"
          },
          "mode": {
            "type": "string",
            "enum": [
              "single",
              "multipart"
            ]
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/UploadPart"
            }
          },
          "part_size_bytes": {
            "type": "integer"
          },
          "part_count": {
            "type": "integer"
          },
          "upload_id": {
            "type": "string",
            "format": "uuid"
          },
          "staging_key": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "sha256",
          "missing"
        ],
        "properties": {
          "sha256": {
            "$ref": "#/$defs/HexSha256"
          },
          "missing": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "$defs": {
    "HexSha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "UploadPart": {
      "type": "object",
      "required": [
        "part_number",
        "url",
        "byte_start",
        "byte_end"
      ],
      "properties": {
        "part_number": {
          "type": "integer",
          "minimum": 1
        },
        "url": {
          "$ref": "#/$defs/Url"
        },
        "byte_start": {
          "type": "integer",
          "minimum": 0
        },
        "byte_end": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "Url": {
      "type": "string",
      "format": "uri"
    }
  }
}