{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opentine.com/schemas/opentine-dataset-withdraw-1.schema.json",
  "title": "opentine-dataset/withdraw/1 claim",
  "description": "A contributor's signed, held withdrawal of a run. A claim convention on an existing attestation, not an object kind.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "convention",
    "run",
    "reason",
    "contributor",
    "withdrawn_at"
  ],
  "properties": {
    "convention": {
      "const": "opentine-dataset/withdraw/1"
    },
    "run": {
      "type": "string",
      "pattern": "^run:sha256:[0-9a-f]{64}$"
    },
    "reason": {
      "enum": [
        "consent-withdrawn",
        "privacy",
        "licence",
        "quality",
        "other"
      ]
    },
    "contributor": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "withdrawn_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
    }
  }
}
