Use getDiscriminatedUnionDecoder instead.