code: func GetState(s string) (State, error) {
  	lower := strings.ToLower(s)
  	switch {
  	case lower == "":
  		return State_STATE_UNSPECIFIED, nil
  	case strings.HasPrefix("free", lower):
  		return State_FREE, nil
  	case strings.HasPrefix("prerelease", lower):
  		return State_PRERELEASE, nil
  	case strings.HasPrefix("serving", lower):
  		return State_SERVING, nil
  	case strings.HasPrefix("test", lower):
  		return State_TEST, nil
  	case strings.HasPrefix("repair", lower):
  		return State_REPAIR, nil
  	case strings.HasPrefix("decommissioned", lower):
  		return State_DECOMMISSIONED, nil
  	default:
  		return -1, errors.Reason("string %q did not match any known state", s).Err()
  	}
  }
docs: // GetState returns a State given its name. Supports prefix matching.