func (s *XPackSecurityChangePasswordService) buildURL() (string, url.Values, error) {
	path, err := uritemplates.Expand("/_xpack/security/user/{username}/_password", map[string]string{
		"username": s.username,
	})
	if err != nil {
		return "", url.Values{}, err
	}
	params := url.Values{}
	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.refresh; v != "" {
		params.Set("refresh", v)
	}
	return path, params, nil
}
buildURL builds the URL for the operation.
package elastic
import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type XPackSecurityChangePasswordService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	username string
	password string
	refresh  string
	body     interface{}
}
func NewXPackSecurityChangePasswordService(client *Client) *XPackSecurityChangePasswordService {
	return &XPackSecurityChangePasswordService{
		client: client,
	}
}
func (s *XPackSecurityChangePasswordService) Pretty(pretty bool) *XPackSecurityChangePasswordService {
	s.pretty = &pretty
	return s
}
func (s *XPackSecurityChangePasswordService) Human(human bool) *XPackSecurityChangePasswordService {
	s.human = &human
	return s
}
func (s *XPackSecurityChangePasswordService) ErrorTrace(errorTrace bool) *XPackSecurityChangePasswordService {
	s.errorTrace = &errorTrace
	return s
}
func (s *XPackSecurityChangePasswordService) FilterPath(filterPath ...string) *XPackSecurityChangePasswordService {
	s.filterPath = filterPath
	return s
}
func (s *XPackSecurityChangePasswordService) Header(name string, value string) *XPackSecurityChangePasswordService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *XPackSecurityChangePasswordService) Headers(headers http.Header) *XPackSecurityChangePasswordService {
	s.headers = headers
	return s
}
func (s *XPackSecurityChangePasswordService) Username(username string) *XPackSecurityChangePasswordService {
	s.username = username
	return s
}
func (s *XPackSecurityChangePasswordService) Password(password string) *XPackSecurityChangePasswordService {
	s.password = password
	return s
}
func (s *XPackSecurityChangePasswordService) Refresh(refresh string) *XPackSecurityChangePasswordService {
	s.refresh = refresh
	return s
}
func (s *XPackSecurityChangePasswordService) Body(body interface{}) *XPackSecurityChangePasswordService {
	s.body = body
	return s
}