BUG-990: fixed deserialization of enums.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
Merge "BUG-990: fixed deserialization of enums."