I have an API reponse which contains a list of objects, each of which can be of a different type. These are defined as Data Classes: