func (r *Request) nextPageTokens() []interface{} {
	if r.Operation.Paginator == nil {
		return nil
	}
	if r.Operation.TruncationToken != "" {
		tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken)
		if len(tr) == 0 {
			return nil
		}
		switch v := tr[0].(type) {
		case *bool:
			if !BoolValue(v) {
				return nil
			}
		case bool:
			if v == false {
				return nil
			}
		}
	}
	tokens := []interface{}{}
	tokenAdded := false
	for _, outToken := range r.Operation.OutputTokens {
		vs, _ := awsutil.ValuesAtPath(r.Data, outToken)
		if len(vs) == 0 {
			tokens = append(tokens, nil)
			continue
		}
		v := vs[0]
		switch tv := v.(type) {
		case *string:
			if len(StringValue(tv)) == 0 {
				tokens = append(tokens, nil)
				continue
			}
		case string:
			if len(tv) == 0 {
				tokens = append(tokens, nil)
				continue
			}
		}
		tokenAdded = true
		tokens = append(tokens, v)
	}
	if !tokenAdded {
		return nil
	}
	return tokens
}
nextPageTokens returns the tokens to use when asking for the next page of data.
package aws
import (
	"sync/atomic"
	"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type Pager struct {
	NewRequest func() (*Request, error)
	started    bool
	nextTokens []interface{}
	err     error
	curPage interface{}
}
func (p *Pager) hasNextPage() bool {
	return !(p.started && len(p.nextTokens) == 0)
}
func (p *Pager) Err() error {
	return p.err
}
func (p *Pager) CurrentPage() interface{} {
	return p.curPage
}
func (p *Pager) Next() bool {
	if !p.hasNextPage() {
		return false
	}
	req, err := p.NewRequest()
	if err != nil {
		p.err = err
		return false
	}
	if p.started {
		for i, intok := range req.Operation.InputTokens {
			awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i])
		}
	}
	p.started = true
	err = req.Send()
	if err != nil {
		p.err = err
		return false
	}
	p.nextTokens = req.nextPageTokens()
	p.curPage = req.Data
	return true
}
type Paginator struct {
	InputTokens     []string
	OutputTokens    []string
	LimitToken      string
	TruncationToken string
}