code: func (s *ClusterStatsService) buildURL() (string, url.Values, error) {
  	// Build URL
  	var err error
  	var path string
  
  	if len(s.nodeId) > 0 {
  		path, err = uritemplates.Expand("/_cluster/stats/nodes/{node_id}", map[string]string{
  			"node_id": strings.Join(s.nodeId, ","),
  		})
  		if err != nil {
  			return "", url.Values{}, err
  		}
  	} else {
  		path, err = uritemplates.Expand("/_cluster/stats", map[string]string{})
  		if err != nil {
  			return "", url.Values{}, err
  		}
  	}
  
  	// Add query string parameters
  	params := url.Values{}
  	if s.pretty {
  		params.Set("pretty", "true")
  	}
  	if s.flatSettings != nil {
  		params.Set("flat_settings", fmt.Sprintf("%v", *s.flatSettings))
  	}
  	if s.human != nil {
  		params.Set("human", fmt.Sprintf("%v", *s.human))
  	}
  	return path, params, nil
  }
docs: // buildURL builds the URL for the operation.