{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/queue/v1/claim-work-response.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Response to an attempt to claim tasks for a worker to process.\n",
  "properties": {
    "tasks": {
      "description": "List of task claims, may be empty if no tasks was claimed, in which case\nthe worker should sleep a tiny bit before polling again.\n",
      "items": {
        "additionalProperties": false,
        "properties": {
          "credentials": {
            "$ref": "task-credentials.json#"
          },
          "runId": {
            "description": "`run-id` assigned to this run of the task\n",
            "maximum": 1000,
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "$ref": "task-status.json#"
          },
          "takenUntil": {
            "description": "Time at which the run expires and is resolved as `exception`,\nwith reason `claim-expired` if the run haven't been reclaimed.\nThis will be some time in the future, with that time controlled\nby the `queue.task_claim_timeout` configuration.\n",
            "format": "date-time",
            "type": "string"
          },
          "task": {
            "$ref": "task.json#"
          },
          "workerGroup": {
            "description": "Identifier for the worker-group within which this run started.\n",
            "maxLength": 38,
            "minLength": 1,
            "pattern": "^([a-zA-Z0-9-_]*)$",
            "type": "string"
          },
          "workerId": {
            "description": "Identifier for the worker executing this run.\n",
            "maxLength": 38,
            "minLength": 1,
            "pattern": "^([a-zA-Z0-9-_]*)$",
            "type": "string"
          }
        },
        "required": [
          "status",
          "runId",
          "workerGroup",
          "workerId",
          "takenUntil",
          "task",
          "credentials"
        ],
        "title": "Task Claim",
        "type": "object"
      },
      "type": "array",
      "uniqueItems": true
    }
  },
  "required": [
    "tasks"
  ],
  "title": "Claim Work Response",
  "type": "object"
}