code: func (s *XPackWatcherStatsService) buildURL() (string, url.Values, error) {
  	// Build URL
  	path := "/_watcher/stats"
  
  	// Add query string parameters
  	params := url.Values{}
  	if s.pretty {
  		params.Set("pretty", "true")
  	}
  	if s.emitStacktraces != nil {
  		params.Set("emit_stacktraces", fmt.Sprintf("%v", *s.emitStacktraces))
  	}
  	if s.metric != "" {
  		params.Set("metric", s.metric)
  	}
  	return path, params, nil
  }
docs: // buildURL builds the URL for the operation.