code: func setContentTypeForClient(cfg *restclient.Config, contentType string) {
  	if len(contentType) == 0 {
  		return
  	}
  	cfg.ContentType = contentType
  	switch contentType {
  	case runtime.ContentTypeProtobuf:
  		cfg.AcceptContentTypes = strings.Join([]string{runtime.ContentTypeProtobuf, runtime.ContentTypeJSON}, ",")
  	default:
  		// otherwise let the rest client perform defaulting
  	}
  }
docs: // setContentTypeForClient sets the appropritae content type into the rest config
  // and handles defaulting AcceptContentTypes based on that input.