code: func (d *Duration) UnmarshalJSON(data []byte) error {
  	var s string
  	if err := json.Unmarshal(data, &s); err != nil {
  		return err
  	}
  	return d.Set(s)
  }
docs: // UnmarshalJSON implements json.Unmarshaler.
  //
  // Unmarshals a JSON entry into the underlying type. The entry is expected to
  // contain a string corresponding to one of the enum's keys.