{
  "type": "record",
  "name": "IntervalMeterRead",
  "namespace": "org.eaot.ami.events",
  "doc": "EAOT sample artefact — canonical Avro contract for meter.read.interval (v1). Idempotency key = readId. Schema registry enforces BACKWARD compatibility.",
  "fields": [
    { "name": "readId", "type": "string", "doc": "UUID; unique per read. Kafka message key." },
    { "name": "meterId", "type": "string" },
    { "name": "servicePointId", "type": ["null", "string"], "default": null },
    { "name": "timestamp", "type": { "type": "long", "logicalType": "timestamp-millis" } },
    { "name": "intervalMinutes", "type": "int", "default": 15 },
    { "name": "value", "type": "double" },
    { "name": "unit", "type": { "type": "enum", "name": "Unit", "symbols": ["KWH", "KVARH", "KW"] } },
    { "name": "quality", "type": { "type": "enum", "name": "Quality", "symbols": ["VALIDATED", "ESTIMATED", "REJECTED"] } },
    { "name": "source", "type": "string", "doc": "Originating head-end identifier" },
    { "name": "schemaVersion", "type": "int", "default": 1 }
  ]
}
