Reduce boilerplate by generating struct `new` and `put` functions. and validate your structs when they are created and updated.