That all said, you should be careful about using data classes with properties that are not part of the constructor. Those properties are not part of any of the utility methods provided by data classes (equals, hashCode, copy, componentN and toString)
The compiler automatically derives the following members from all properties declared in the primary constructor:
equals() / hashCode() pair;
toString() of the form "User(name=John, age=42)" ;