Create enum when define Types object from Rule

Signed-off-by: Sylwke3100 <sylwek3100@gmail,com>