{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opentine.com/schemas/opentine-weight-custody-1.schema.json",
  "title": "opentine.weight-custody/1 claim",
  "description": "One custody event of a weight artifact, referenced by digest only. A claim convention on an existing attestation, not an object kind.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "convention",
    "artifact",
    "event",
    "seq",
    "prev",
    "location",
    "digest",
    "size",
    "run",
    "data",
    "lineage",
    "tags",
    "recorded_at"
  ],
  "properties": {
    "convention": {
      "const": "opentine.weight-custody/1"
    },
    "artifact": {
      "type": "string"
    },
    "event": {
      "enum": [
        "created",
        "copied",
        "loaded",
        "exported",
        "destroyed",
        "approved"
      ]
    },
    "seq": {
      "type": "integer",
      "minimum": 0
    },
    "prev": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^attestation:sha256:[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "location": {
      "type": "string"
    },
    "digest": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "size": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ]
    },
    "run": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^sha256:[0-9a-f]{64}$"
      }
    },
    "lineage": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "enum": [
          "model-organism"
        ]
      }
    },
    "recorded_at": {
      "type": "string"
    }
  }
}
