func (w *workloadEndpoints) List(metadata api.WorkloadEndpointMetadata) (*api.WorkloadEndpointList, error) {
	l := api.NewWorkloadEndpointList()
	err := w.c.list(metadata, w, l)
	return l, err
}
List takes a Metadata, and returns a WorkloadEndpointList that contains the list of workload endpoints
that match the Metadata (wildcarding missing fields).
package client
import (
	"github.com/google/uuid"
	api "github.com/projectcalico/libcalico-go/lib/apis/v1"
	"github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned"
	"github.com/projectcalico/libcalico-go/lib/backend/model"
	"github.com/projectcalico/libcalico-go/lib/converter"
)
type WorkloadEndpointInterface interface {
	List(api.WorkloadEndpointMetadata) (*api.WorkloadEndpointList, error)
	Get(api.WorkloadEndpointMetadata) (*api.WorkloadEndpoint, error)
	Create(*api.WorkloadEndpoint) (*api.WorkloadEndpoint, error)
	Update(*api.WorkloadEndpoint) (*api.WorkloadEndpoint, error)
	Apply(*api.WorkloadEndpoint) (*api.WorkloadEndpoint, error)
	Delete(api.WorkloadEndpointMetadata) error
}
type workloadEndpoints struct {
	converter.WorkloadEndpointConverter
	c *Client
}
func newWorkloadEndpoints(c *Client) WorkloadEndpointInterface {
	return &workloadEndpoints{c: c}
}
func (w *workloadEndpoints) Create(a *api.WorkloadEndpoint) (*api.WorkloadEndpoint, error) {
	w.setCreateDefaults(a)
	return a, w.c.create(*a, w)
}
func (w *workloadEndpoints) Update(a *api.WorkloadEndpoint) (*api.WorkloadEndpoint, error) {
	return a, w.c.update(*a, w)
}
func (w *workloadEndpoints) Apply(a *api.WorkloadEndpoint) (*api.WorkloadEndpoint, error) {
	return a, w.c.apply(*a, w)
}
func (w *workloadEndpoints) Delete(metadata api.WorkloadEndpointMetadata) error {
	return w.c.delete(metadata, w)
}
func (w *workloadEndpoints) Get(metadata api.WorkloadEndpointMetadata) (*api.WorkloadEndpoint, error) {
	if a, err := w.c.get(metadata, w); err != nil {
		return nil, err
	} else {
		return a.(*api.WorkloadEndpoint), nil
	}
}