After applying this library to our project I found that the only missing builders I have missing are messages that are transformed back to builders to create a copy with a slight modification.
In order to do that I suggest to add a extensions function called copy (the same as data classes) that handles the transformation to builder and the build. It can be written like this:
fun Message.copy(block: Message.Builder.() -> Unit) = this.toBuilder().apply(block).build()
After applying this library to our project I found that the only missing builders I have missing are messages that are transformed back to builders to create a copy with a slight modification.
In order to do that I suggest to add a extensions function called copy (the same as data classes) that handles the transformation to builder and the build. It can be written like this:
fun Message.copy(block: Message.Builder.() -> Unit) = this.toBuilder().apply(block).build()