func (s *DeleteService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/{index}/{type}/{id}", map[string]string{
		"index": s.index,
		"type":  s.typ,
		"id":    s.id,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "1")
	}
	if s.refresh != nil {
		params.Set("refresh", fmt.Sprintf("%v", *s.refresh))
	}
	if s.replication != "" {
		params.Set("replication", s.replication)
	}
	if s.routing != "" {
		params.Set("routing", s.routing)
	}
	if s.timeout != "" {
		params.Set("timeout", s.timeout)
	}
	if s.version != nil {
		params.Set("version", fmt.Sprintf("%v", s.version))
	}
	if s.versionType != "" {
		params.Set("version_type", s.versionType)
	}
	if s.consistency != "" {
		params.Set("consistency", s.consistency)
	}
	if s.parent != "" {
		params.Set("parent", s.parent)
	}
	return path, params, nil
}
buildURL builds the URL for the operation.
package elastic
import (
	"fmt"
	"net/url"
	"gopkg.in/olivere/elastic.v3/uritemplates"
)
type DeleteService struct {
	client      *Client
	pretty      bool
	id          string
	index       string
	typ         string
	routing     string
	timeout     string
	version     interface{}
	versionType string
	consistency string
	parent      string
	refresh     *bool
	replication string
}
func NewDeleteService(client *Client) *DeleteService {
	return &DeleteService{
		client: client,
	}
}
func (s *DeleteService) Type(typ string) *DeleteService {
	s.typ = typ
	return s
}
func (s *DeleteService) Id(id string) *DeleteService {
	s.id = id
	return s
}
func (s *DeleteService) Index(index string) *DeleteService {
	s.index = index
	return s
}
func (s *DeleteService) Replication(replication string) *DeleteService {
	s.replication = replication
	return s
}
func (s *DeleteService) Routing(routing string) *DeleteService {
	s.routing = routing
	return s
}
func (s *DeleteService) Timeout(timeout string) *DeleteService {
	s.timeout = timeout
	return s
}
func (s *DeleteService) Version(version interface{}) *DeleteService {
	s.version = version
	return s
}
func (s *DeleteService) VersionType(versionType string) *DeleteService {
	s.versionType = versionType
	return s
}
func (s *DeleteService) Consistency(consistency string) *DeleteService {
	s.consistency = consistency
	return s
}
func (s *DeleteService) Parent(parent string) *DeleteService {
	s.parent = parent
	return s
}
func (s *DeleteService) Refresh(refresh bool) *DeleteService {
	s.refresh = &refresh
	return s
}
func (s *DeleteService) Pretty(pretty bool) *DeleteService {
	s.pretty = pretty
	return s
}