i have the following situation:
i have a sealed class containing data class
the call look like : SealedClass.V1 (for the version 1 of the data) V2 and etc...
i got the data version from the device
i would like to call my data class like this :
val version = "V$dataVersion" //so should be V1
SealedClass.version(someStuff)
is there a way to do that(currently my way to do this is with when(version) but it could came messy if at some point we got more version of the data structure