{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "urn:luminetric:canonical:1:request.duplicate",
 "$comment": "Generated by build_schemas.py. Open by design: accept fields and enum values you do not recognise (COMPATIBILITY.md).",
 "title": "request.duplicate",
 "description": "A request carrying a file you already sent. Follow the earlier request's events.",
 "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": "request.duplicate"
  },
  "duplicate_id": {
   "type": "string",
   "pattern": "^dup_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
   "description": "The delivery id."
  },
  "request_id": {
   "type": "string",
   "minLength": 1,
   "description": "This (duplicate) request."
  },
  "client_reference": {
   "type": "string",
   "minLength": 1,
   "maxLength": 255
  },
  "duplicate_of": {
   "type": "object",
   "properties": {
    "request_id": {
     "type": "string",
     "minLength": 1
    },
    "client_reference": {
     "type": "string",
     "minLength": 1,
     "maxLength": 255
    }
   },
   "required": [
    "request_id"
   ]
  },
  "document_id": {
   "type": "string",
   "pattern": "^doc_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
   "description": "The file, the same id as on the earlier request."
  },
  "detected_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 the duplicate was detected. ISO 8601, UTC."
  },
  "message": {
   "type": "string"
  }
 },
 "required": [
  "schema_version",
  "event",
  "duplicate_id",
  "request_id",
  "duplicate_of",
  "detected_at",
  "message"
 ]
}
