Generating types for choice elements. Deserialization method implementation.