Understanding and application

What is the grammatical role of صَالِحًا in وَلَدًا صَالِحًا?

Truthfulness, Social Rights, and Ongoing Charity (Hadith 104-109)