func (s *UpdateService) IfSeqNo(seqNo int64) *UpdateService {
	s.ifSeqNo = &seqNo
	return s
}
IfSeqNo indicates to only perform the update operation if the last
operation that has changed the document has the specified sequence number.
package elastic
import (
	"context"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type UpdateService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	index               string
	typ                 string
	id                  string
	routing             string
	parent              string
	script              *Script
	fields              []string
	fsc                 *FetchSourceContext
	version             *int64
	versionType         string
	retryOnConflict     *int
	refresh             string
	waitForActiveShards string
	upsert              interface{}
	scriptedUpsert      *bool
	docAsUpsert         *bool
	detectNoop          *bool
	doc                 interface{}
	timeout             string
	ifSeqNo             *int64
	ifPrimaryTerm       *int64
}
func NewUpdateService(client *Client) *UpdateService {
	return &UpdateService{
		client: client,
		typ:    "_doc",
		fields: make([]string, 0),
	}
}
func (s *UpdateService) Pretty(pretty bool) *UpdateService {
	s.pretty = &pretty
	return s
}
func (s *UpdateService) Human(human bool) *UpdateService {
	s.human = &human
	return s
}
func (s *UpdateService) ErrorTrace(errorTrace bool) *UpdateService {
	s.errorTrace = &errorTrace
	return s
}
func (s *UpdateService) FilterPath(filterPath ...string) *UpdateService {
	s.filterPath = filterPath
	return s
}
func (s *UpdateService) Header(name string, value string) *UpdateService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *UpdateService) Headers(headers http.Header) *UpdateService {
	s.headers = headers
	return s
}
func (s *UpdateService) Index(name string) *UpdateService {
	s.index = name
	return s
}
func (s *UpdateService) Type(typ string) *UpdateService {
	s.typ = typ
	return s
}
func (s *UpdateService) Id(id string) *UpdateService {
	s.id = id
	return s
}
func (s *UpdateService) Routing(routing string) *UpdateService {
	s.routing = routing
	return s
}
func (s *UpdateService) Parent(parent string) *UpdateService {
	s.parent = parent
	return s
}
func (s *UpdateService) Script(script *Script) *UpdateService {
	s.script = script
	return s
}
func (s *UpdateService) RetryOnConflict(retryOnConflict int) *UpdateService {
	s.retryOnConflict = &retryOnConflict
	return s
}
func (s *UpdateService) Fields(fields ...string) *UpdateService {
	s.fields = make([]string, 0, len(fields))
	s.fields = append(s.fields, fields...)
	return s
}
func (s *UpdateService) Version(version int64) *UpdateService {
	s.version = &version
	return s
}
func (s *UpdateService) VersionType(versionType string) *UpdateService {
	s.versionType = versionType
	return s
}
func (s *UpdateService) Refresh(refresh string) *UpdateService {
	s.refresh = refresh
	return s
}
func (s *UpdateService) WaitForActiveShards(waitForActiveShards string) *UpdateService {
	s.waitForActiveShards = waitForActiveShards
	return s
}
func (s *UpdateService) Doc(doc interface{}) *UpdateService {
	s.doc = doc
	return s
}
func (s *UpdateService) Upsert(doc interface{}) *UpdateService {
	s.upsert = doc
	return s
}
func (s *UpdateService) DocAsUpsert(docAsUpsert bool) *UpdateService {
	s.docAsUpsert = &docAsUpsert
	return s
}
func (s *UpdateService) DetectNoop(detectNoop bool) *UpdateService {
	s.detectNoop = &detectNoop
	return s
}
func (s *UpdateService) ScriptedUpsert(scriptedUpsert bool) *UpdateService {
	s.scriptedUpsert = &scriptedUpsert
	return s
}
func (s *UpdateService) Timeout(timeout string) *UpdateService {
	s.timeout = timeout
	return s
}