{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "record_id",
    "record_kind",
    "version",
    "state",
    "attempt",
    "max_attempts",
    "actor",
    "lease_token",
    "transition_nonce",
    "payload",
    "transition_outcomes"
  ],
  "properties": {
    "schema_version": {
      "const": 1
    },
    "record_id": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "record_kind": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "version": {
      "type": "integer",
      "minimum": 0
    },
    "state": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "attempt": {
      "type": "integer",
      "minimum": 1
    },
    "max_attempts": {
      "type": "integer",
      "minimum": 1
    },
    "actor": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "lease_token": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "transition_nonce": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "payload": {
      "type": "object"
    },
    "transition_outcomes": {
      "type": "array",
      "minItems": 1,
      "maxItems": 64,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "nonce",
          "version",
          "state",
          "attempt",
          "actor",
          "lease_token"
        ],
        "properties": {
          "nonce": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "state": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          },
          "actor": {
            "type": "string",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
          },
          "lease_token": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
          }
        }
      }
    }
  }
}
