Have a look at the Twitter thread which hinted me on this feature. The thread shows the way TypeScript defines new types basing on values of other types used in a string form.
Currently we have an ability in Java to add a mix-in interface which would allow to have a custom toString(), but it's too much work. A more simple approach would be to have a type option, which would be used by a Model Compiler for a corresponding language. Something like this:
message Length {
option (string_form) = "${value}${units}";
int value = 1 [(required) = true];
LengthUnit units = 2 [(required) = true];
}