func (s *IndicesDeleteTemplateService) Do() (*IndicesDeleteTemplateResponse, error) {
	if err := s.Validate(); err != nil {
		return nil, err
	}
	path, params, err := s.buildURL()
	if err != nil {
		return nil, err
	}
	res, err := s.client.PerformRequest("DELETE", path, params, nil)
	if err != nil {
		return nil, err
	}
	ret := new(IndicesDeleteTemplateResponse)
	if err := s.client.decoder.Decode(res.Body, ret); err != nil {
		return nil, err
	}
	return ret, nil
}
Do executes the operation.
package elastic
import (
	"fmt"
	"net/url"
	"gopkg.in/olivere/elastic.v3/uritemplates"
)
type IndicesDeleteTemplateService struct {
	client        *Client
	pretty        bool
	name          string
	timeout       string
	masterTimeout string
}
func NewIndicesDeleteTemplateService(client *Client) *IndicesDeleteTemplateService {
	return &IndicesDeleteTemplateService{
		client: client,
	}
}
func (s *IndicesDeleteTemplateService) Name(name string) *IndicesDeleteTemplateService {
	s.name = name
	return s
}
func (s *IndicesDeleteTemplateService) Timeout(timeout string) *IndicesDeleteTemplateService {
	s.timeout = timeout
	return s
}
func (s *IndicesDeleteTemplateService) MasterTimeout(masterTimeout string) *IndicesDeleteTemplateService {
	s.masterTimeout = masterTimeout
	return s
}
func (s *IndicesDeleteTemplateService) Pretty(pretty bool) *IndicesDeleteTemplateService {
	s.pretty = pretty
	return s
}
func (s *IndicesDeleteTemplateService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/_template/{name}", map[string]string{
		"name": s.name,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "1")
	}
	if s.timeout != "" {
		params.Set("timeout", s.timeout)
	}
	if s.masterTimeout != "" {
		params.Set("master_timeout", s.masterTimeout)
	}
	return path, params, nil
}
func (s *IndicesDeleteTemplateService) Validate() error {
	var invalid []string
	if s.name == "" {
		invalid = append(invalid, "Name")
	}
	if len(invalid) > 0 {
		return fmt.Errorf("missing required fields: %v", invalid)
	}
	return nil
}