Creates getter and setter methods for the selected struct field.