You can use the Mx Model reflection module https://appstore.home.mendix.com/link/app/69/ 😎
If you want to use the attribute names in a microflow, see Pim's solution with ModelReflection. If you want to have them in Java, you should check out the API docs. There you will find a getMembers(IContext context)
function on IMendixObject.