// NextPage attempts to retrieve the next page, or returns error if unable to.
NextPage attempts to retrieve the next page, or returns error if unable to.
// NextPage attempts to retrieve the next page or returns error if unable to .
func (p *S3ListObjectsV2Paginator) NextPage(ctx context.Context) (
	*s3.ListObjectsV2Output, error,
) {
	if !p.HasMorePages() {
		return nil, fmt.Errorf("no more pages available")
	}
	params := p.params
	if v := p.options.Limit; v != 0 {
		params.MaxKeys = &v
	}
	result, err := p.client.ListObjectsV2(ctx, &params)
	if err != nil {
		return nil, err
	}
	p.firstPage = false
	if result.IsTruncated != nil && *result.IsTruncated == false {
		p.nextToken = nil
	} else {
		p.nextToken = result.NextContinuationToken
	}
	p.params.ContinuationToken = p.nextToken
	return result, nil
}
func ( p * S3ListObjectsV2Paginator ) NextPage ( ctx context . Context ) ( * s3 . ListObjectsV2Output , error , ) { if ! p . HasMorePages ( ) { return nil , fmt . Errorf ( " " ) } params := p . params if v := p . options . Limit ; v != 0 { params . MaxKeys = & v } result , err := p . client . ListObjectsV2 ( ctx , & params ) if err != nil { return nil , err } p . firstPage = false if result . IsTruncated != nil && * result . IsTruncated == false { p . nextToken = nil } else { p . nextToken = result . NextContinuationToken } p . params . ContinuationToken = p . nextToken return result , nil }
NextPage attempts to retrieve the next page, or returns error if unable to.
NextPage attempts to retrieve the next page or returns error if unable to .