{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "ArgumentCondition": {
      "properties": {
        "index": {
          "type": "integer",
          "maximum": 65535,
          "minimum": 0
        },
        "equals": {
          "type": "string",
          "contentEncoding": "base64"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "index",
        "equals"
      ],
      "description": "ArgumentCondition requires the argument at Index (0 is the first argument after the predicate) to equal the canonical Ontos value Equals."
    },
    "PositionRange": {
      "properties": {
        "after": {
          "oneOf": [
            {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "through": {
          "oneOf": [
            {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false,
      "type": "object",
      "description": "PositionRange bounds a filter to positions in (After, Through]."
    }
  },
  "properties": {
    "predicate": {
      "type": "string",
      "contentEncoding": "base64"
    },
    "arguments": {
      "items": {
        "$ref": "#/$defs/ArgumentCondition"
      },
      "type": "array"
    },
    "origin": {
      "type": "string",
      "enum": [
        "append",
        "create"
      ]
    },
    "positions": {
      "oneOf": [
        {
          "$ref": "#/$defs/PositionRange"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "type": "object",
  "title": "Filter",
  "description": "Filter is a conjunction of structural conditions compared by Ontos equality."
}
