{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/TaskRun",
  "title": "TaskRun",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Task run unique identifier"
    },
    "type": {
      "type": "string",
      "enum": [
        "DataFlowExecution",
        "ViewDeployment",
        "DataReplication"
      ],
      "description": "Task type"
    },
    "status": {
      "type": "string",
      "enum": [
        "Pending",
        "Running",
        "Completed",
        "Failed"
      ],
      "description": "Task execution status"
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "description": "When the task started"
    },
    "endTime": {
      "type": "string",
      "format": "date-time",
      "description": "When the task completed"
    },
    "rowsProcessed": {
      "type": "integer",
      "description": "Number of rows processed"
    },
    "errorMessage": {
      "type": "string",
      "description": "Error message if the task failed"
    }
  }
}