What is the grammatical role of قَاضٍ in جَاءَ قَاضٍ?

Noun Case Class 8 — The Manqūṣ Noun