build in factories for easier access towards enum instances

Signed-off-by: derwinlu <derwinlu+git@gmail.com>