{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.precept.sh/schemas/run-manifest/1.0/nodes/read.json",
  "type": "object",
  "properties": {
    "source": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "dataSourceId": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            }
          },
          "required": [
            "dataSourceId",
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "trailer": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "removed": {
                    "type": "number"
                  },
                  "declared": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actual": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "removed",
                  "declared",
                  "actual"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "path",
          "trailer"
        ],
        "additionalProperties": false
      }
    },
    "decrypted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "onCastFailure": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "fail",
            "null",
            "reject"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "source",
    "files",
    "decrypted",
    "onCastFailure"
  ],
  "additionalProperties": false
}
