{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-cluster-pending-tasks-pending-task-schema.json",
  "title": "cluster.pending_tasks.PendingTask",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-cluster-api-openapi.yml#/components/schemas/cluster.pending_tasks.PendingTask",
  "type": "object",
  "properties": {
    "executing": {
      "description": "Indicates whether the pending tasks are currently executing or not.",
      "type": "boolean"
    },
    "insert_order": {
      "description": "The number that represents when the task has been inserted into the task queue.",
      "type": "number"
    },
    "priority": {
      "description": "The priority of the pending task.\nThe valid priorities in descending priority order are: `IMMEDIATE` > `URGENT` > `HIGH` > `NORMAL` > `LOW` > `LANGUID`.",
      "type": "string"
    },
    "source": {
      "description": "A general description of the cluster task that may include a reason and origin.",
      "type": "string"
    },
    "time_in_queue": {
      "description": "The time since the task is waiting for being performed.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.Duration"
        }
      ]
    },
    "time_in_queue_millis": {
      "description": "The time expressed in milliseconds since the task is waiting for being performed.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.DurationValueUnitMillis"
        }
      ]
    }
  },
  "required": [
    "executing",
    "insert_order",
    "priority",
    "source",
    "time_in_queue_millis"
  ],
  "$defs": {
    "_types.Duration": {
      "description": "A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and\n`d` (days). Also accepts \"0\" without a unit and \"-1\" to indicate an unspecified value.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "enum": [
            "-1"
          ]
        },
        {
          "type": "string",
          "enum": [
            "0"
          ]
        }
      ]
    },
    "_types.DurationValueUnitMillis": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.UnitMillis"
        }
      ]
    },
    "_types.UnitMillis": {
      "description": "Time unit for milliseconds",
      "type": "number"
    }
  }
}