func (s *CatAliasesService) Do(ctx context.Context) (CatAliasesResponse, error) {
	path, params, err := s.buildURL()
	if err != nil {
		return nil, err
	}
	res, err := s.client.PerformRequest(ctx, PerformRequestOptions{
		Method:  "GET",
		Path:    path,
		Params:  params,
		Headers: s.headers,
	})
	if err != nil {
		return nil, err
	}
	var ret CatAliasesResponse
	if err := s.client.decoder.Decode(res.Body, &ret); err != nil {
		return nil, err
	}
	return ret, nil
}
Do executes the operation.
package elastic
import (
	"context"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type CatAliasesService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	local         *bool
	masterTimeout string
	aliases       []string
	columns       []string
	sort          []string  
}
func NewCatAliasesService(client *Client) *CatAliasesService {
	return &CatAliasesService{
		client: client,
	}
}
func (s *CatAliasesService) Pretty(pretty bool) *CatAliasesService {
	s.pretty = &pretty
	return s
}
func (s *CatAliasesService) Human(human bool) *CatAliasesService {
	s.human = &human
	return s
}
func (s *CatAliasesService) ErrorTrace(errorTrace bool) *CatAliasesService {
	s.errorTrace = &errorTrace
	return s
}
func (s *CatAliasesService) FilterPath(filterPath ...string) *CatAliasesService {
	s.filterPath = filterPath
	return s
}
func (s *CatAliasesService) Header(name string, value string) *CatAliasesService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *CatAliasesService) Headers(headers http.Header) *CatAliasesService {
	s.headers = headers
	return s
}
func (s *CatAliasesService) Alias(alias ...string) *CatAliasesService {
	s.aliases = alias
	return s
}
func (s *CatAliasesService) Local(local bool) *CatAliasesService {
	s.local = &local
	return s
}
func (s *CatAliasesService) MasterTimeout(masterTimeout string) *CatAliasesService {
	s.masterTimeout = masterTimeout
	return s
}
func (s *CatAliasesService) Columns(columns ...string) *CatAliasesService {
	s.columns = columns
	return s
}
func (s *CatAliasesService) Sort(fields ...string) *CatAliasesService {
	s.sort = fields
	return s
}
func (s *CatAliasesService) buildURL() (string, url.Values, error) {
	var (
		path string
		err  error
	)
	if len(s.aliases) > 0 {
		path, err = uritemplates.Expand("/_cat/aliases/{name}", map[string]string{
			"name": strings.Join(s.aliases, ","),
		})
	} else {
		path = "/_cat/aliases"
	}
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{
		"format": []string{"json"},  
	}
	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.local; v != nil {
		params.Set("local", fmt.Sprint(*v))
	}
	if s.masterTimeout != "" {
		params.Set("master_timeout", s.masterTimeout)
	}
	if len(s.sort) > 0 {
		params.Set("s", strings.Join(s.sort, ","))
	}
	if len(s.columns) > 0 {
		params.Set("h", strings.Join(s.columns, ","))
	}
	return path, params, nil
}