{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/elastic/elasticsearch/master/x-pack/plugin/core/src/test/resources/rest-api-spec/schema/transform_stats.schema.json",
  "description": "schema definition for a single transform stats",
  "additionalProperties": false,
  "title": "Root",
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "checkpointing": {
      "$ref": "file:transform_checkpointing_info.schema.json"
    },
    "id": {
      "type": "string",
      "description": "The transform id"
    },
    "state": {
      "type": "string",
      "enum": [
        "started",
        "stopped",
        "stopping",
        "indexing",
        "failed",
        "aborting",
        "waiting"
      ],
      "description": "The transform state"
    },
    "stats": {
      "$ref": "file:transform_indexer_stats.schema.json"
    },
    "node": {
      "type": "object",
      "description": "TODO: move this into a separate schema file",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "the node id"
        },
        "name": {
          "type": "string",
          "description": "the node name"
        },
        "ephemeral_id": {
          "type": "string",
          "description": "the node ephemeral id"
        },
        "transport_address": {
          "type": "string",
          "description": "the node transport address"
        },
        "attributes": {
          "type": "object",
          "description": "TODO"
        }
      }
    },
    "reason": {
      "type": "string",
      "description": "reason if failed"
    },
    "health": {
      "$ref": "file:transform_health.schema.json"
    }
  }
}
