func (s *XPackIlmPutLifecycleService) Policy(policy string) *XPackIlmPutLifecycleService {
	s.policy = policy
	return s
}
Policy is the name of the index lifecycle policy.
package elastic
import (
	"context"
	"fmt"
	"net/http"
	"net/url"
	"strings"
	"github.com/olivere/elastic/v7/uritemplates"
)
type XPackIlmPutLifecycleService struct {
	client *Client
	pretty     *bool        
	human      *bool        
	errorTrace *bool        
	filterPath []string     
	headers    http.Header  
	policy        string
	timeout       string
	masterTimeout string
	flatSettings  *bool
	bodyJson      interface{}
	bodyString    string
}
func NewXPackIlmPutLifecycleService(client *Client) *XPackIlmPutLifecycleService {
	return &XPackIlmPutLifecycleService{
		client: client,
	}
}
func (s *XPackIlmPutLifecycleService) Pretty(pretty bool) *XPackIlmPutLifecycleService {
	s.pretty = &pretty
	return s
}
func (s *XPackIlmPutLifecycleService) Human(human bool) *XPackIlmPutLifecycleService {
	s.human = &human
	return s
}
func (s *XPackIlmPutLifecycleService) ErrorTrace(errorTrace bool) *XPackIlmPutLifecycleService {
	s.errorTrace = &errorTrace
	return s
}
func (s *XPackIlmPutLifecycleService) FilterPath(filterPath ...string) *XPackIlmPutLifecycleService {
	s.filterPath = filterPath
	return s
}
func (s *XPackIlmPutLifecycleService) Header(name string, value string) *XPackIlmPutLifecycleService {
	if s.headers == nil {
		s.headers = http.Header{}
	}
	s.headers.Add(name, value)
	return s
}
func (s *XPackIlmPutLifecycleService) Headers(headers http.Header) *XPackIlmPutLifecycleService {
	s.headers = headers
	return s
}