func (s arangoBackupPolicyNamespaceLister) Get(name string) (*v1.ArangoBackupPolicy, error) {
	obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1.Resource("arangobackuppolicy"), name)
	}
	return obj.(*v1.ArangoBackupPolicy), nil
}
Get retrieves the ArangoBackupPolicy from the indexer for a given namespace and name.
package v1
import (
	v1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)
type ArangoBackupPolicyLister interface {
	List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error)
	ArangoBackupPolicies(namespace string) ArangoBackupPolicyNamespaceLister
	ArangoBackupPolicyListerExpansion
}
type arangoBackupPolicyLister struct {
	indexer cache.Indexer
}
func NewArangoBackupPolicyLister(indexer cache.Indexer) ArangoBackupPolicyLister {
	return &arangoBackupPolicyLister{indexer: indexer}
}
func (s *arangoBackupPolicyLister) List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.ArangoBackupPolicy))
	})
	return ret, err
}
func (s *arangoBackupPolicyLister) ArangoBackupPolicies(namespace string) ArangoBackupPolicyNamespaceLister {
	return arangoBackupPolicyNamespaceLister{indexer: s.indexer, namespace: namespace}
}
type ArangoBackupPolicyNamespaceLister interface {
	List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error)
	Get(name string) (*v1.ArangoBackupPolicy, error)
	ArangoBackupPolicyNamespaceListerExpansion
}
type arangoBackupPolicyNamespaceLister struct {
	indexer   cache.Indexer
	namespace string
}
func (s arangoBackupPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error) {
	err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.ArangoBackupPolicy))
	})
	return ret, err
}