code: func (c *parameterCodec) EncodeParameters(obj Object, to unversioned.GroupVersion) (url.Values, error) {
  	gvk, _, err := c.typer.ObjectKind(obj)
  	if err != nil {
  		return nil, err
  	}
  	if to != gvk.GroupVersion() {
  		out, err := c.convertor.ConvertToVersion(obj, to.String())
  		if err != nil {
  			return nil, err
  		}
  		obj = out
  	}
  	return queryparams.Convert(obj)
  }
docs: // EncodeParameters converts the provided object into the to version, then converts that object to url.Values.
  // Returns an error if conversion is not possible.