{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.redlineautohaus.com/docs/uds/schemas/message.json","type":"object","properties":{"session_id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"source_record_id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"external_record_key":{"type":"string","minLength":1,"maxLength":191},"client_namespace":{"type":"string","minLength":1,"maxLength":128},"layer":{"type":"string","enum":["uds_pdu","can_frame","transport_packet","unknown","other"]},"direction":{"type":"string","enum":["tester_to_ecu","ecu_to_tester","peer_to_peer","unknown"]},"source_direction":{"type":"string","minLength":1,"maxLength":64},"source_order":{"type":"string","pattern":"^[0-9]{1,20}$"},"observed_at":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":256},"normalized_utc":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,6})?Z$"},"timezone":{"type":"string","minLength":1,"maxLength":128},"precision":{"type":"string","minLength":1,"maxLength":32},"clock_domain":{"type":"string","minLength":1,"maxLength":128},"conversion_method":{"type":"string","minLength":1,"maxLength":256},"relative_nanoseconds":{"type":"string","pattern":"^-?[0-9]+(?:\\.[0-9]+)?$","maxLength":80},"accuracy":{"type":"string","minLength":1,"maxLength":128}},"required":[],"additionalProperties":false},"connection_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},{"type":"null"}]},"endpoint_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},{"type":"null"}]},"extraction_run_id":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},{"type":"null"}]},"payload":{"type":"object","properties":{"representation":{"type":"string","enum":["complete","partial","unavailable"]},"payload_hex":{"type":"string","minLength":1,"maxLength":131072},"payload_base64":{"type":"string","minLength":1,"maxLength":87384},"artifact_range":{"type":"object","properties":{"artifact_id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"},"offset_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"length_bytes":{"type":"integer","minimum":0,"maximum":104857600},"sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}},"required":["artifact_id","offset_bytes","length_bytes","sha256"],"additionalProperties":false},"reason":{"type":"string","minLength":1,"maxLength":2048},"reported_total_length":{"type":"integer","minimum":0,"maximum":9007199254740991},"missing_ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991},"reason":{"type":"string","minLength":1,"maxLength":1024}},"required":["start","end"],"additionalProperties":false},"maxItems":256},"segments":{"type":"array","items":{"type":"object","properties":{"ordinal":{"type":"integer","minimum":0,"maximum":2147483647},"offset_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"payload_hex":{"type":"string","minLength":1,"maxLength":131072},"payload_base64":{"type":"string","minLength":1,"maxLength":87384}},"required":["ordinal"],"additionalProperties":false},"maxItems":1024}},"required":["representation"],"additionalProperties":false},"extraction_quality":{"type":"string","enum":["exact","transcribed","uncertain","unknown"]},"diagnostic_status":{"type":"string","minLength":1,"maxLength":64},"transport_outcome":{"type":"string","minLength":1,"maxLength":64},"extensions":{"type":"object","maxProperties":32,"propertyNames":{"pattern":"^[a-z][a-z0-9_.-]{0,127}$"},"additionalProperties":{"type":"object","properties":{"schema_version":{"type":"string","minLength":1,"maxLength":32},"data":{"type":"object","maxProperties":256}},"required":["schema_version","data"],"additionalProperties":false}}},"required":["session_id","source_record_id","external_record_key","client_namespace","layer","payload"],"additionalProperties":false}