I'm looking to create an object structure that has a dynamic class that I would want to change:
Top level:
data class TopLevel(
var myCustomClass1: MyCustomClass1,
var myCustomClass2: MyCustomClass2)
Second level:
data class MyCustomClass2(var dynamicClass: DynamicClass)
The DynamicClass is the the one I want to change.e.g I may want to use DynamicClass or DynamicClass2 within MyCustomClass2.
What is the best way to do this using kotlin?