func (s *XPackWatcherPutWatchService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/_watcher/watch/{id}", map[string]string{
		"id": s.id,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if v := s.pretty; v != nil {
		params.Set("pretty", fmt.Sprint(*v))
	}
	if v := s.human; v != nil {
		params.Set("human", fmt.Sprint(*v))
	}
	if v := s.errorTrace; v != nil {
		params.Set("error_trace", fmt.Sprint(*v))
	}
	if len(s.filterPath) > 0 {
		params.Set("filter_path", strings.Join(s.filterPath, ","))
	}
	if v := s.active; v != nil {
		params.Set("active", fmt.Sprint(*v))
	}
	if s.masterTimeout != "" {
		params.Set("master_timeout", s.masterTimeout)
	}
	if v := s.ifSeqNo; v != nil {
		params.Set("if_seq_no", fmt.Sprintf("%d", *v))
	}
	if v := s.ifPrimaryTerm; v != nil {
		params.Set("if_primary_term", fmt.Sprintf("%d", *v))
	}
	return path, params, nil
}
buildURL builds the URL for the operation.
package elastic
import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type XPackWatcherPutWatchService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	id            string
	active        *bool
	masterTimeout string
	ifSeqNo       *int64
	ifPrimaryTerm *int64
	body          interface{}
}
func NewXPackWatcherPutWatchService(client *Client) *XPackWatcherPutWatchService {
	return &XPackWatcherPutWatchService{
		client: client,
	}
}
func (s *XPackWatcherPutWatchService) Pretty(pretty bool) *XPackWatcherPutWatchService {
	s.pretty = &pretty
	return s
}
func (s *XPackWatcherPutWatchService) Human(human bool) *XPackWatcherPutWatchService {
	s.human = &human
	return s
}
func (s *XPackWatcherPutWatchService) ErrorTrace(errorTrace bool) *XPackWatcherPutWatchService {
	s.errorTrace = &errorTrace
	return s
}
func (s *XPackWatcherPutWatchService) FilterPath(filterPath ...string) *XPackWatcherPutWatchService {
	s.filterPath = filterPath
	return s
}
func (s *XPackWatcherPutWatchService) Header(name string, value string) *XPackWatcherPutWatchService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *XPackWatcherPutWatchService) Headers(headers http.Header) *XPackWatcherPutWatchService {
	s.headers = headers
	return s
}
func (s *XPackWatcherPutWatchService) Id(id string) *XPackWatcherPutWatchService {
	s.id = id
	return s
}
func (s *XPackWatcherPutWatchService) Active(active bool) *XPackWatcherPutWatchService {
	s.active = &active
	return s
}
func (s *XPackWatcherPutWatchService) MasterTimeout(masterTimeout string) *XPackWatcherPutWatchService {
	s.masterTimeout = masterTimeout
	return s
}
func (s *XPackWatcherPutWatchService) IfSeqNo(seqNo int64) *XPackWatcherPutWatchService {
	s.ifSeqNo = &seqNo
	return s
}
func (s *XPackWatcherPutWatchService) IfPrimaryTerm(primaryTerm int64) *XPackWatcherPutWatchService {
	s.ifPrimaryTerm = &primaryTerm
	return s
}
func (s *XPackWatcherPutWatchService) Body(body interface{}) *XPackWatcherPutWatchService {
	s.body = body
	return s
}