{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "urn:luminetric:canonical:1:statement.withdrawn",
 "$comment": "Generated by build_schemas.py. Open by design: accept fields and enum values you do not recognise (COMPATIBILITY.md).",
 "title": "statement.withdrawn",
 "description": "A statement you were sent that a re-extraction no longer contains.",
 "type": "object",
 "properties": {
  "schema_version": {
   "type": "string",
   "pattern": "^1\\.[0-9]+\\.[0-9]+$",
   "description": "Semantic version of this contract. This schema covers major version 1."
  },
  "event": {
   "type": "string",
   "const": "statement.withdrawn"
  },
  "withdrawal_id": {
   "type": "string",
   "pattern": "^wdr_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
   "description": "The delivery id."
  },
  "statement_id": {
   "type": "string",
   "pattern": "^stt_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
   "description": "The withdrawn statement."
  },
  "last_version_id": {
   "type": "string",
   "pattern": "^ver_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
   "description": "The last version of it you were sent."
  },
  "request_id": {
   "type": "string",
   "minLength": 1
  },
  "client_reference": {
   "type": "string",
   "minLength": 1,
   "maxLength": 255
  },
  "withdrawn_at": {
   "type": "string",
   "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$",
   "description": "When it was withdrawn. ISO 8601, UTC."
  },
  "reason": {
   "type": "object",
   "properties": {
    "code": {
     "type": "string",
     "description": "Why. Known values: not_in_reextraction. Values may be added in a minor version.",
     "x-known-values": [
      "not_in_reextraction"
     ]
    },
    "message": {
     "type": "string"
    }
   },
   "required": [
    "code",
    "message"
   ]
  }
 },
 "required": [
  "schema_version",
  "event",
  "withdrawal_id",
  "statement_id",
  "last_version_id",
  "request_id",
  "withdrawn_at",
  "reason"
 ]
}
