func (s *IndicesShrinkService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/{source}/_shrink/{target}", map[string]string{
		"source": s.source,
		"target": s.target,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "true")
	}
	if s.masterTimeout != "" {
		params.Set("master_timeout", s.masterTimeout)
	}
	if s.timeout != "" {
		params.Set("timeout", s.timeout)
	}
	if s.waitForActiveShards != "" {
		params.Set("wait_for_active_shards", s.waitForActiveShards)
	}
	return path, params, nil
}
buildURL builds the URL for the operation.
package elastic
import (
	"context"
	"encoding/json"
	"fmt"
	"net/url"
	"github.com/olivere/elastic/uritemplates"
)
type IndicesShrinkService struct {
	client              *Client
	pretty              bool
	source              string
	target              string
	masterTimeout       string
	timeout             string
	waitForActiveShards string
	bodyJson            interface{}
	bodyString          string
}
func NewIndicesShrinkService(client *Client) *IndicesShrinkService {
	return &IndicesShrinkService{
		client: client,
	}
}
func (s *IndicesShrinkService) Source(source string) *IndicesShrinkService {
	s.source = source
	return s
}
func (s *IndicesShrinkService) Target(target string) *IndicesShrinkService {
	s.target = target
	return s
}
func (s *IndicesShrinkService) MasterTimeout(masterTimeout string) *IndicesShrinkService {
	s.masterTimeout = masterTimeout
	return s
}
func (s *IndicesShrinkService) Timeout(timeout string) *IndicesShrinkService {
	s.timeout = timeout
	return s
}
func (s *IndicesShrinkService) WaitForActiveShards(waitForActiveShards string) *IndicesShrinkService {
	s.waitForActiveShards = waitForActiveShards
	return s
}
func (s *IndicesShrinkService) Pretty(pretty bool) *IndicesShrinkService {
	s.pretty = pretty
	return s
}
func (s *IndicesShrinkService) BodyJson(body interface{}) *IndicesShrinkService {
	s.bodyJson = body
	return s
}
func (s *IndicesShrinkService) BodyString(body string) *IndicesShrinkService {
	s.bodyString = body
	return s
}