mutable property

bool mutable
final

Whether the generated data class is mutable. (default: true)

If true:

  • Definition class fields must be non-final.
  • Definition class must have a non-const default constructor.
  • Generated data class fields will be non-final.
  • Generated setter will modify fields in place.

If false:

  • Definition class fields must be final.
  • Definition class must have a const default constructor.
  • Generated data class fields will be final.
  • Generated setter will return a new instance with updated fields.

Implementation

final bool mutable;