{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "bytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 262144000
    },
    "receivedBytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 262144000
    },
    "maxChunkBytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4194304
    },
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "state": {
      "type": "string",
      "enum": [
        "uploading",
        "validating",
        "complete",
        "expired",
        "failed",
        "canceled"
      ]
    },
    "expiresAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
    },
    "manifestSha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "receivedChunks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0,
            "maximum": 262144000
          },
          "bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4194304
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "offset",
          "bytes",
          "sha256"
        ]
      },
      "maxItems": 63,
      "minItems": 0
    },
    "bundle": {
      "anyOf": [
        {
          "$ref": "#/components/schemas/ProjectAgentUploadBundle"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "workspaceId",
    "bytes",
    "receivedBytes",
    "maxChunkBytes",
    "sha256",
    "state",
    "expiresAt",
    "manifestSha256",
    "receivedChunks",
    "bundle"
  ]
}