func (h *profiles) convertAPIToKVPair(a unversioned.Resource) (*model.KVPair, error) {
	return h.ConvertAPIToKVPair(a)
}
convertMetadataToKey converts a ProfileMetadata to a ProfileKey
This is part of the conversionHelper interface.  Call through to the shared
converter (embedded in the profiles struct).
package client
import (
	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 ProfileInterface interface {
	List(api.ProfileMetadata) (*api.ProfileList, error)
	Get(api.ProfileMetadata) (*api.Profile, error)
	Create(*api.Profile) (*api.Profile, error)
	Update(*api.Profile) (*api.Profile, error)
	Apply(*api.Profile) (*api.Profile, error)
	Delete(api.ProfileMetadata) error
}
type profiles struct {
	converter.ProfileConverter
	c *Client
}
func newProfiles(c *Client) ProfileInterface {
	return &profiles{c: c}
}
func (h *profiles) Create(a *api.Profile) (*api.Profile, error) {
	return a, h.c.create(*a, h)
}
func (h *profiles) Update(a *api.Profile) (*api.Profile, error) {
	return a, h.c.update(*a, h)
}
func (h *profiles) Apply(a *api.Profile) (*api.Profile, error) {
	return a, h.c.apply(*a, h)
}
func (h *profiles) Delete(metadata api.ProfileMetadata) error {
	return h.c.delete(metadata, h)
}
func (h *profiles) Get(metadata api.ProfileMetadata) (*api.Profile, error) {
	if a, err := h.c.get(metadata, h); err != nil {
		return nil, err
	} else {
		return a.(*api.Profile), nil
	}
}
func (h *profiles) List(metadata api.ProfileMetadata) (*api.ProfileList, error) {
	l := api.NewProfileList()
	err := h.c.list(metadata, h, l)
	return l, err
}
func (h *profiles) convertMetadataToListInterface(m unversioned.ResourceMetadata) (model.ListInterface, error) {
	hm := m.(api.ProfileMetadata)
	l := model.ProfileListOptions{
		Name: hm.Name,
	}
	return l, nil
}
func (h *profiles) convertMetadataToKey(m unversioned.ResourceMetadata) (model.Key, error) {
	return h.ConvertMetadataToKey(m)
}