{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eon.io/json-schema/eon.io-state-move-schema.json",
  "title": "StateMove",
  "description": "Where the environment stands after a move: the day re-read from every system.",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/console-era-openapi.json#/components/schemas/StateMove",
  "properties": {
    "tenant": {
      "type": "string",
      "title": "Tenant"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "State",
      "description": "The day every system agrees on; null while they disagree or one cannot be read."
    },
    "held": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Held",
      "description": "The day the systems that answered hold, when they agree."
    },
    "split": {
      "type": "boolean",
      "title": "Split"
    },
    "building": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Building"
    },
    "states": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "States"
    },
    "notes": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Notes"
    },
    "next": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next"
    },
    "action": {
      "type": "string",
      "title": "Action"
    },
    "by_connector": {
      "items": {
        "$ref": "#/$defs/ConnectorDay"
      },
      "type": "array",
      "title": "By Connector"
    },
    "unavailable": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Unavailable"
    },
    "target": {
      "type": "string",
      "title": "Target",
      "description": "The day asked for, or ``advance``."
    },
    "failed": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Failed",
      "description": "Systems that refused or did not answer the move; a 207 names at least one."
    }
  },
  "type": "object",
  "required": [
    "tenant",
    "state",
    "held",
    "split",
    "building",
    "states",
    "notes",
    "next",
    "action",
    "by_connector",
    "unavailable",
    "target",
    "failed"
  ],
  "$defs": {
    "ConnectorDay": {
      "properties": {
        "connector": {
          "type": "string",
          "title": "Connector"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "State"
        },
        "ok": {
          "type": "boolean",
          "title": "Ok"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason",
          "description": "Why the system named no day; null when it did."
        }
      },
      "type": "object",
      "required": [
        "connector",
        "state",
        "ok",
        "reason"
      ],
      "title": "ConnectorDay"
    }
  }
}