Reapply "Provide a macro to define a map along with type safe accessors" am: 28296961f6
am: 12e464af18

Change-Id: Iade33822b698535adf6a58cb29b6ba8e515c6b9c