func ListBuilderForObjects(pvs *PVList) *ListBuilder {
	b := &ListBuilder{}
	if pvs == nil {
		b.errs = append(b.errs, errors.New("failed to build pv list: missing object list"))
		return b
	}
	b.list = pvs
	return b
}
ListBuilderForObjects builds the ListBuilder object based on PVList
package persistentvolume
import (
	errors "github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
)
type ListBuilder struct {
	list    *PVList
	filters PredicateList
	errs    []error
}
func NewListBuilder() *ListBuilder {
	return &ListBuilder{list: &PVList{}}
}
func ListBuilderForAPIObjects(pvs *corev1.PersistentVolumeList) *ListBuilder {
	b := &ListBuilder{list: &PVList{}}
	if pvs == nil {
		b.errs = append(b.errs, errors.New("failed to build pv list: missing api list"))
		return b
	}
	for _, pv := range pvs.Items {
		pv := pv
		b.list.items = append(b.list.items, &PV{object: &pv})
	}
	return b
}