func (s podChaperonNamespaceLister) Get(name string) (*v1alpha1.PodChaperon, error) {
	obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1alpha1.Resource("podchaperon"), name)
	}
	return obj.(*v1alpha1.PodChaperon), nil
}
Get retrieves the PodChaperon from the indexer for a given namespace and name.
package v1alpha1
import (
	v1alpha1 "admiralty.io/multicluster-scheduler/pkg/apis/multicluster/v1alpha1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)
type PodChaperonLister interface {
	List(selector labels.Selector) (ret []*v1alpha1.PodChaperon, err error)
	PodChaperons(namespace string) PodChaperonNamespaceLister
	PodChaperonListerExpansion
}
type podChaperonLister struct {
	indexer cache.Indexer
}
func NewPodChaperonLister(indexer cache.Indexer) PodChaperonLister {
	return &podChaperonLister{indexer: indexer}
}
func (s *podChaperonLister) List(selector labels.Selector) (ret []*v1alpha1.PodChaperon, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.PodChaperon))
	})
	return ret, err
}
func (s *podChaperonLister) PodChaperons(namespace string) PodChaperonNamespaceLister {
	return podChaperonNamespaceLister{indexer: s.indexer, namespace: namespace}
}
type PodChaperonNamespaceLister interface {
	List(selector labels.Selector) (ret []*v1alpha1.PodChaperon, err error)
	Get(name string) (*v1alpha1.PodChaperon, error)
	PodChaperonNamespaceListerExpansion
}
type podChaperonNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}
func (s podChaperonNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodChaperon, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.PodChaperon))
	})
	return ret, err
}