more flexible getter interface in gen messages